diff options
| author | 2014-10-08 22:55:44 +0300 | |
|---|---|---|
| committer | 2014-10-08 22:55:44 +0300 | |
| commit | 368b43572d3017542b2c2f056b196a4f7c79820f (patch) | |
| tree | 4c5de63c485869f184e3e8ed8918b4b01266d839 | |
| parent | 973aff99b713d300b5b5a17847960707c675702c (diff) | |
| download | nnn-368b43572d3017542b2c2f056b196a4f7c79820f.tar.gz | |
Comment on dirents deep copy
| -rw-r--r-- | noice.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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"); |