]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix build failure
authorArun Prakash Jana <engineerarun@gmail.com>
Sun, 11 Jun 2017 14:39:42 +0000 (20:09 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sun, 11 Jun 2017 14:39:42 +0000 (20:09 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index 23eaa430ecf9b74090311422eb4520e1eaec91a6..4fd2b21ef7bd89a3e6b6c9d5a7b1f183b3ce3402 100644 (file)
--- 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