浏览代码

No need for a temporary buffer

xdirname() uses xstrdup() internally so we are safe to use that
pointer directly.
master
sin 10 年前
父节点
当前提交
9bc4b92474
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. +1
    -3
      noice.c

+ 1
- 3
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 */


正在加载...
取消
保存