]> git.ipfire.org Git - thirdparty/make.git/commitdiff
(read_dirstream): Fix braino: fill in the buffer when not reallocating it!
authorRoland McGrath <roland@redhat.com>
Tue, 12 Dec 1995 05:48:31 +0000 (05:48 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 12 Dec 1995 05:48:31 +0000 (05:48 +0000)
dir.c

diff --git a/dir.c b/dir.c
index 95f2bcd4cf51bf0f7c7feac48104beefc1738e23..f4019da1b689376ed0af886466000c7c0ee6588d 100644 (file)
--- 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)