mirror of
https://github.com/jarun/nnn.git
synced 2025-03-31 18:46:33 +00:00
Comment on dirents deep copy
This commit is contained in:
parent
973aff99b7
commit
368b43572d
1 changed files with 1 additions and 0 deletions
1
noice.c
1
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…
Add table
Reference in a new issue