瀏覽代碼

Comment on dirents deep copy

master
lostd 10 年之前
父節點
當前提交
368b43572d
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. +1
    -0
      noice.c

+ 1
- 0
noice.c 查看文件

@@ -234,6 +234,7 @@ begin:
if (strcmp(dp->d_name, ".") == 0
|| strcmp(dp->d_name, "..") == 0)
continue;
/* Deep copy because readdir(3) reuses the entries */
dents = realloc(dents, (n + 1) * sizeof(*dents));
if (dents == NULL)
printerr(1, "realloc");


Loading…
取消
儲存