From: Arun Prakash Jana Date: Sun, 11 Jun 2017 14:39:42 +0000 (+0530) Subject: Fix build failure X-Git-Tag: v1.2~19 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=8404c0fd044f6fc6c1833bbc656ed3b93e480c37;p=nnn.git Fix build failure --- diff --git a/nnn.c b/nnn.c index 23eaa430..4fd2b21e 100644 --- a/nnn.c +++ b/nnn.c @@ -1312,7 +1312,7 @@ static int show_help(void) { char tmp[] = "/tmp/nnnXXXXXX"; - int fd = mkstemp(tmp); + int i = 0, fd = mkstemp(tmp); if (fd == -1) return -1; @@ -1357,7 +1357,7 @@ show_help(void) if (getenv("NNN_BMS")) { dprintf(fd, "BOOKMARKS\n"); - for (int i = 0; i < MAX_BM; i++) + for (; i < MAX_BM; i++) if (bookmark[i].key) dprintf(fd, " %s: %s\n", bookmark[i].key, bookmark[i].loc); else