noice

small file browser
git clone git://git.2f30.org/noice
Log | Files | Refs | README | LICENSE

commit 9bc4b92474ded6ff9097525646311e424a5cddc3
parent 35f3b250bb1e218a46da9e6287f31fb5aeaa3f62
Author: sin <sin@2f30.org>
Date:   Wed, 22 Oct 2014 15:14:33 +0100

No need for a temporary buffer

xdirname() uses xstrdup() internally so we are safe to use that
pointer directly.

Diffstat:
Mnoice.c | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/noice.c b/noice.c @@ -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 */