summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2010-07-31 08:54:43 +0000
committerRay Lai <ray@cvs.openbsd.org>2010-07-31 08:54:43 +0000
commit89e1017e592e46c056bcd0a0da9eec6af024ef55 (patch)
tree99e62f8a6332336007acaa5b56bee4c7a6cd7126 /usr.bin
parentf88fe37f8b21d58e67113c1860fdc273a9504701 (diff)
Checking for -1 as an overflow value is pretty absurd. Returning
the unix epoch is equally absurd. Just return Start for now. We may add overflow checks in the future. OK xsa nicm
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/date.y7
-rw-r--r--usr.bin/rcs/date.y7
2 files changed, 4 insertions, 10 deletions
diff --git a/usr.bin/cvs/date.y b/usr.bin/cvs/date.y
index 3421ebda471..eed407e10fd 100644
--- a/usr.bin/cvs/date.y
+++ b/usr.bin/cvs/date.y
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: date.y,v 1.21 2010/07/29 18:52:45 ray Exp $ */
+/* $OpenBSD: date.y,v 1.22 2010/07/31 08:54:42 ray Exp $ */
/*
** Originally written by Steven M. Bellovin <smb@research.att.com> while
@@ -862,10 +862,7 @@ date_parse(const char *p)
Start += tod;
}
- /* Have to do *something* with a legitimate -1 so it's distinguishable
- * from the error return value. (Alternately could set errno on error.)
- */
- return (Start == -1) ? (0) : (Start);
+ return Start;
}
#if defined(TEST)
diff --git a/usr.bin/rcs/date.y b/usr.bin/rcs/date.y
index 6eca12eaacc..42984602e2d 100644
--- a/usr.bin/rcs/date.y
+++ b/usr.bin/rcs/date.y
@@ -1,5 +1,5 @@
%{
-/* $OpenBSD: date.y,v 1.9 2010/07/29 18:52:45 ray Exp $ */
+/* $OpenBSD: date.y,v 1.10 2010/07/31 08:54:42 ray Exp $ */
/*
** Originally written by Steven M. Bellovin <smb@research.att.com> while
@@ -867,10 +867,7 @@ date_parse(const char *p)
Start += tod;
}
- /* Have to do *something* with a legitimate -1 so it's distinguishable
- * from the error return value. (Alternately could set errno on error.)
- */
- return (Start == -1) ? (0) : (Start);
+ return Start;
}
#if defined(TEST)