mirror of
https://github.com/jarun/nnn.git
synced 2024-11-16 08:03:16 +00:00
Fix clang error
This commit is contained in:
parent
d2865de329
commit
78de6b5752
11
src/nnn.c
11
src/nnn.c
|
@ -459,7 +459,7 @@ static struct timespec gtimeout;
|
|||
#define clearprompt() printmsg("")
|
||||
#define printwarn() printmsg(strerror(errno))
|
||||
#define istopdir(path) ((path)[1] == '\0' && (path)[0] == '/')
|
||||
#define copycurname() xstrlcpy(lastname, dents[cur].name, NAME_MAX + 1)
|
||||
#define copycurname() if (ndents) xstrlcpy(lastname, dents[cur].name, NAME_MAX + 1)
|
||||
#define settimeout() timeout(1000)
|
||||
#define cleartimeout() timeout(-1)
|
||||
#define errexit() printerr(__LINE__)
|
||||
|
@ -3301,7 +3301,6 @@ nochange:
|
|||
presel = filterentries(path);
|
||||
|
||||
/* Save current */
|
||||
if (ndents)
|
||||
copycurname();
|
||||
|
||||
if (presel == 27) {
|
||||
|
@ -3391,7 +3390,6 @@ nochange:
|
|||
}
|
||||
|
||||
/* Save current */
|
||||
if (ndents)
|
||||
copycurname();
|
||||
goto begin;
|
||||
case SEL_STATS:
|
||||
|
@ -3436,7 +3434,6 @@ nochange:
|
|||
r = handle_archive(newpath, "-x", path);
|
||||
break;
|
||||
case SEL_REDRAW:
|
||||
if (ndents)
|
||||
copycurname();
|
||||
goto begin;
|
||||
case SEL_RENAMEALL:
|
||||
|
@ -3483,7 +3480,6 @@ nochange:
|
|||
presel = FILTER;
|
||||
|
||||
/* Save current */
|
||||
if (ndents)
|
||||
copycurname();
|
||||
|
||||
/* Repopulate as directory content may have changed */
|
||||
|
@ -3629,7 +3625,6 @@ nochange:
|
|||
|
||||
spawn("sh", "-c", g_buf, path, F_NORMAL);
|
||||
|
||||
if (ndents)
|
||||
copycurname();
|
||||
if (cfg.filtermode)
|
||||
presel = FILTER;
|
||||
|
@ -3794,7 +3789,6 @@ nochange:
|
|||
|
||||
if (cfg.filtermode)
|
||||
presel = FILTER;
|
||||
if (ndents)
|
||||
copycurname();
|
||||
goto begin;
|
||||
} else {
|
||||
|
@ -3934,7 +3928,6 @@ nochange:
|
|||
presel = FILTER;
|
||||
|
||||
/* Save current */
|
||||
if (ndents)
|
||||
copycurname();
|
||||
|
||||
/* Repopulate as directory content may have changed */
|
||||
|
@ -4011,7 +4004,6 @@ nochange:
|
|||
if (xlines != LINES || xcols != COLS) {
|
||||
idle = 0;
|
||||
setdirwatch();
|
||||
if (ndents)
|
||||
copycurname();
|
||||
goto begin;
|
||||
}
|
||||
|
@ -4020,7 +4012,6 @@ nochange:
|
|||
if (idletimeout && idle == idletimeout) {
|
||||
idle = 0;
|
||||
spawn(utils[LOCKER], NULL, NULL, NULL, F_NORMAL);
|
||||
if (ndents)
|
||||
copycurname();
|
||||
goto begin;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue