summaryrefslogtreecommitdiff
path: root/usr.bin/rcs/date.y
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/rcs/date.y
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/rcs/date.y')
-rw-r--r--usr.bin/rcs/date.y7
1 files changed, 2 insertions, 5 deletions
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)