mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
No need for a temporary buffer
xdirname() uses xstrdup() internally so we are safe to use that pointer directly.
This commit is contained in:
parent
35f3b250bb
commit
9bc4b92474
4
noice.c
4
noice.c
|
@ -551,10 +551,8 @@ nochange:
|
||||||
goto nochange;
|
goto nochange;
|
||||||
} else {
|
} else {
|
||||||
dir = xdirname(path);
|
dir = xdirname(path);
|
||||||
tmp = xmalloc(strlen(dir) + 1);
|
|
||||||
strlcpy(tmp, dir, strlen(dir) + 1);
|
|
||||||
free(path);
|
free(path);
|
||||||
path = tmp;
|
path = dir;
|
||||||
free(filter);
|
free(filter);
|
||||||
filter = xstrdup(ifilter); /* Reset filter */
|
filter = xstrdup(ifilter); /* Reset filter */
|
||||||
/* Recall history */
|
/* Recall history */
|
||||||
|
|
Loading…
Reference in a new issue