浏览代码

Initialize `n' and `dents'

master
sin 11 年前
父节点
当前提交
b06a4d4eeb
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      noice.c

+ 4
- 1
noice.c 查看文件

@@ -497,6 +497,10 @@ browse(const char *ipath, const char *ifilter)


cur = 0; cur = 0;
begin: begin:
/* Path and filter should be malloc(3)-ed strings at all times */
n = 0;
dents = NULL;

dirp = opendir(path); dirp = opendir(path);
if (dirp == NULL) { if (dirp == NULL) {
printwarn(); printwarn();
@@ -511,7 +515,6 @@ begin:
if (r != 0) if (r != 0)
goto nochange; goto nochange;


dents = NULL;
n = dentfill(dirp, &dents, visible, &filter_re); n = dentfill(dirp, &dents, visible, &filter_re);


/* Make sure cur is in range */ /* Make sure cur is in range */


正在加载...
取消
保存