summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/cvs/checkout.c8
-rw-r--r--usr.bin/cvs/diff.c5
-rw-r--r--usr.bin/cvs/file.c5
-rw-r--r--usr.bin/cvs/util.c6
4 files changed, 8 insertions, 16 deletions
diff --git a/usr.bin/cvs/checkout.c b/usr.bin/cvs/checkout.c
index 13a6a2c3176..a6ff611b5ea 100644
--- a/usr.bin/cvs/checkout.c
+++ b/usr.bin/cvs/checkout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: checkout.c,v 1.61 2006/06/06 06:58:46 xsa Exp $ */
+/* $OpenBSD: checkout.c,v 1.62 2006/06/14 20:28:53 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -201,8 +201,7 @@ cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, BUF *bp, int flags)
if (exists == 0) {
rcstime = rcs_rev_getdate(cf->file_rcs, rnum);
- if ((rcstime = cvs_hack_time(rcstime, 0)) == 0)
- fatal("cvs_checkout_file: time conversion failed");
+ rcstime = cvs_hack_time(rcstime, 0);
} else {
time(&rcstime);
}
@@ -213,8 +212,7 @@ cvs_checkout_file(struct cvs_file *cf, RCSNUM *rnum, BUF *bp, int flags)
if (futimes(cf->fd, tv) == -1)
fatal("cvs_checkout_file: futimes: %s", strerror(errno));
- if ((rcstime = cvs_hack_time(rcstime, 1)) == 0)
- fatal("cvs_checkout_file: to gmt failed");
+ rcstime = cvs_hack_time(rcstime, 1);
ctime_r(&rcstime, tbuf);
if (tbuf[strlen(tbuf) - 1] == '\n')
diff --git a/usr.bin/cvs/diff.c b/usr.bin/cvs/diff.c
index afe65b4c9cb..9f039c332f6 100644
--- a/usr.bin/cvs/diff.c
+++ b/usr.bin/cvs/diff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diff.c,v 1.102 2006/06/01 20:01:47 joris Exp $ */
+/* $OpenBSD: diff.c,v 1.103 2006/06/14 20:28:53 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -196,9 +196,6 @@ cvs_diff_local(struct cvs_file *cf)
fatal("failed to load %s", cf->file_path);
st.st_mtime = cvs_hack_time(st.st_mtime, 1);
- if (st.st_mtime == 0)
- fatal("cvs_diff_local: to gmt failed");
-
tv2[0].tv_sec = st.st_mtime;
tv2[0].tv_usec = 0;
tv2[1] = tv2[0];
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index 6fb4a065093..dd772024e0d 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.159 2006/06/14 14:10:50 joris Exp $ */
+/* $OpenBSD: file.c,v 1.160 2006/06/14 20:28:53 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -660,9 +660,6 @@ cvs_file_classify(struct cvs_file *cf, const char *tag, int loud)
fatal("cvs_file_classify: %s", strerror(errno));
mtime = cvs_hack_time(st.st_mtime, 1);
- if (mtime == 0)
- fatal("to gmt failed");
-
if (mtime != cf->file_ent->ce_mtime)
ismodified = 1;
}
diff --git a/usr.bin/cvs/util.c b/usr.bin/cvs/util.c
index 35b42703aa6..afcaee42902 100644
--- a/usr.bin/cvs/util.c
+++ b/usr.bin/cvs/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.87 2006/06/14 15:14:47 xsa Exp $ */
+/* $OpenBSD: util.c,v 1.88 2006/06/14 20:28:53 joris Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2005, 2006 Joris Vink <joris@openbsd.org>
@@ -551,7 +551,7 @@ cvs_hack_time(time_t oldtime, int togmt)
if (togmt == 1) {
t = gmtime(&oldtime);
if (t == NULL)
- return (0);
+ fatal("gmtime failed");
return (mktime(t));
}
@@ -562,7 +562,7 @@ cvs_hack_time(time_t oldtime, int togmt)
t->tm_mon + 1, t->tm_mday, t->tm_year + 1900, t->tm_hour,
t->tm_min, t->tm_sec);
if (l == -1 || l >= (int)sizeof(tbuf))
- return (0);
+ fatal("cvs_hack_time: overflow");
return (cvs_date_parse(tbuf));
}