Selaa lähdekoodia

Comment on dirents deep copy

master
lostd 10 vuotta sitten
vanhempi
commit
368b43572d
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. +1
    -0
      noice.c

+ 1
- 0
noice.c Näytä tiedosto

@@ -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…
Peruuta
Tallenna