瀏覽代碼

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


Loading…
取消
儲存