]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(tail_file): Initialize ignore, dev, and ino members,
authorJim Meyering <jim@meyering.net>
Sun, 3 Dec 2000 20:36:19 +0000 (20:36 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 3 Dec 2000 20:36:19 +0000 (20:36 +0000)
when tailing forever and the open failed.  Otherwise, we could get
uninitialized memory references of those fields in recheck.

src/tail.c

index 5a65e085d27f52da2714394bf8a40d7fac61b800..1ab9a8f3a68f1c7596647b613f2cdcf8f46b897b 100644 (file)
@@ -1137,6 +1137,9 @@ tail_file (struct File_spec *f, off_t n_units)
        {
          f->fd = -1;
          f->errnum = errno;
+         f->ignore = 0;
+         f->ino = 0;
+         f->dev = 0;
        }
       error (0, errno, "%s", pretty_name (f));
       errors = 1;