]> Sergey Matveev's repositories - nnn.git/commitdiff
Use the global buffer
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 3 Jul 2017 12:39:11 +0000 (18:09 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 3 Jul 2017 12:39:11 +0000 (18:09 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index d7c6df6e56844bd074e4eb9b6142cd4316be4abd..845f1ab3554251cb695497bfd622c1613003e426 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -372,7 +372,7 @@ xmemrchr(const void *s, uchar ch, size_t n)
 static char *
 xdirname(const char *path)
 {
-       static char buf[PATH_MAX];
+       static char *buf = g_buf;
        static char *last_slash;
 
        xstrlcpy(buf, path, PATH_MAX);