diff options
author | 2003-12-16 22:15:10 +0000 | |
---|---|---|
committer | 2003-12-16 22:15:10 +0000 | |
commit | 6bc26a22dc9360d0c8051892cb7846c823a65d4e (patch) | |
tree | 52951e9a7772a1242e1a3a57d7aa9c82f23c9f84 | |
parent | for -DSMALL, do not include rcsid[]s (diff) | |
download | wireguard-openbsd-6bc26a22dc9360d0c8051892cb7846c823a65d4e.tar.xz wireguard-openbsd-6bc26a22dc9360d0c8051892cb7846c823a65d4e.zip |
Better fix for MALLOC_OPTIONS=J bug. Something had problems with
returning a NULL label so now we just the epoch for the timestamp
if we cannot stat the file. OK deraadt@
-rw-r--r-- | gnu/usr.bin/cvs/src/rcs.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c index ac060e26e2f..d5da7c21405 100644 --- a/gnu/usr.bin/cvs/src/rcs.c +++ b/gnu/usr.bin/cvs/src/rcs.c @@ -8416,22 +8416,14 @@ make_file_label (path, rev, rcs) else wm = gmtime (&sb.st_mtime); } - else + if (wm == NULL) { time_t t = 0; wm = gmtime(&t); } - if (wm) - { - (void) tm_to_internet (datebuf, wm); - (void) sprintf (label, "-L%s\t%s", path, datebuf); - } - else - { - free(label); - label = NULL; - } + (void) tm_to_internet (datebuf, wm); + (void) sprintf (label, "-L%s\t%s", path, datebuf); } return label; } |