diff options
author | sin <sin@2f30.org> | 2014-10-22 15:14:33 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2014-10-22 15:14:33 +0100 |
commit | 9bc4b92474ded6ff9097525646311e424a5cddc3 (patch) | |
tree | 9865dc73d87fc4837ff156406280329b22d25971 /noice.c | |
parent | 35f3b250bb1e218a46da9e6287f31fb5aeaa3f62 (diff) | |
download | nnn-9bc4b92474ded6ff9097525646311e424a5cddc3.tar.gz |
No need for a temporary buffer
xdirname() uses xstrdup() internally so we are safe to use that
pointer directly.
Diffstat (limited to 'noice.c')
-rw-r--r-- | noice.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -551,10 +551,8 @@ nochange: goto nochange; } else { dir = xdirname(path); - tmp = xmalloc(strlen(dir) + 1); - strlcpy(tmp, dir, strlen(dir) + 1); free(path); - path = tmp; + path = dir; free(filter); filter = xstrdup(ifilter); /* Reset filter */ /* Recall history */ |