summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2018-03-17 17:49:20 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2018-03-17 17:49:20 +0100
commitc095665d1c5caea598afb3f6d4bbc08f3a55ac61 (patch)
treeac5e74d68e49822b138815f33e1e23e152139f9f
parente5a5e71d7c25ff3b7d61183b387a312fe8c769c3 (diff)
Avoid a cppcheck false positiv in interface_file_select_ncurses()
-rw-r--r--src/phrecn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/phrecn.c b/src/phrecn.c
index d5b12fd..5599078 100644
--- a/src/phrecn.c
+++ b/src/phrecn.c
@@ -590,7 +590,7 @@ void interface_file_select_ncurses(file_enable_t *files_enable)
wmove(stdscr,5,4);
if(offset>0)
wprintw(stdscr,"Previous");
- for(i=offset;files_enable[i].file_hint!=NULL && i<offset+INTER_FSELECT;i++)
+ for(i=offset; i<offset+INTER_FSELECT && files_enable[i].file_hint!=NULL; i++)
{
wmove(stdscr,6+i-offset,0);
wclrtoeol(stdscr); /* before addstr for BSD compatibility */