summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cvs
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-12-16 22:15:11 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-12-16 22:15:11 +0000
commitba9fdd12549af4456c83102dcd337df247574615 (patch)
treeff266369f9a4ebfe9558f3c746722622e4173f86 /gnu/usr.bin/cvs
parent60ef245f3fba4099b11818fdb599c0b374604b38 (diff)
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@
Diffstat (limited to 'gnu/usr.bin/cvs')
-rw-r--r--gnu/usr.bin/cvs/src/rcs.c14
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;
}