diff options
Diffstat (limited to 'dirent/scandir.c')
-rw-r--r-- | dirent/scandir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dirent/scandir.c b/dirent/scandir.c index e2ef63a..6907f08 100644 --- a/dirent/scandir.c +++ b/dirent/scandir.c @@ -64,7 +64,7 @@ DEFUN(scandir, (dir, namelist, select, cmp), v = new; } - dsize = &d->d_name[d->d_namlen + 1] - (char *) d; + dsize = &d->d_name[_D_ALLOC_NAMLEN (d)] - (char *) d; v[i] = (struct dirent *) malloc (dsize); if (v[i] == NULL) goto lose; |