No need for a temporary buffer

xdirname() uses xstrdup() internally so we are safe to use that
pointer directly.
This commit is contained in:
sin 2014-10-22 15:14:33 +01:00
parent 35f3b250bb
commit 9bc4b92474

View file

@ -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 */