diff options
author | Roland McGrath <roland@redhat.com> | 1995-12-12 05:48:31 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1995-12-12 05:48:31 +0000 |
commit | 5df0d419852be2a1fbd4a579b182aacf2a5c2469 (patch) | |
tree | d4119a4470dfb4d4de44f4cd25ff4ccd14b053ac /dir.c | |
parent | 737e056a896830a85e6103071f806c76bc882a26 (diff) | |
download | gunmake-5df0d419852be2a1fbd4a579b182aacf2a5c2469.tar.gz |
(read_dirstream): Fix braino: fill in the buffer when not reallocating it!
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -616,14 +616,14 @@ read_dirstream (stream) if (sizeof *d - sizeof d->d_name + len > bufsz) bufsz = sizeof *d - sizeof d->d_name + len; buf = xmalloc (bufsz); - d = (struct dirent *) buf; - d->d_ino = 1; + } + d = (struct dirent *) buf; + FAKE_DIR_ENTRY (d); #ifdef HAVE_D_NAMLEN - d->d_namlen = len - 1; + d->d_namlen = len - 1; #endif - memcpy (d->d_name, df->name, len); - return d; - } + memcpy (d->d_name, df->name, len); + return d; } } if (++ds->bucket == DIRFILE_BUCKETS) |