summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>1995-12-12 05:48:31 +0000
committerRoland McGrath <roland@redhat.com>1995-12-12 05:48:31 +0000
commit5df0d419852be2a1fbd4a579b182aacf2a5c2469 (patch)
treed4119a4470dfb4d4de44f4cd25ff4ccd14b053ac /dir.c
parent737e056a896830a85e6103071f806c76bc882a26 (diff)
downloadgunmake-5df0d419852be2a1fbd4a579b182aacf2a5c2469.tar.gz
(read_dirstream): Fix braino: fill in the buffer when not reallocating it!
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dir.c b/dir.c
index 95f2bcd..f4019da 100644
--- a/dir.c
+++ b/dir.c
@@ -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)