diff options
author | davidn <davidn@FreeBSD.org> | 1999-03-15 08:16:01 +0000 |
---|---|---|
committer | davidn <davidn@FreeBSD.org> | 1999-03-15 08:16:01 +0000 |
commit | d70ee45d7f7d3540a26eb189d8a3871bcbd9dd64 (patch) | |
tree | 375f3738bad2d0e367766c971296244ef8e1569c /usr.sbin | |
parent | 3386e28dad5b9a402196e6c9591221b5e4821690 (diff) | |
download | FreeBSD-src-d70ee45d7f7d3540a26eb189d8a3871bcbd9dd64.zip FreeBSD-src-d70ee45d7f7d3540a26eb189d8a3871bcbd9dd64.tar.gz |
Fix date parsing to allow '0' (none) date value.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pw/psdate.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/pw/psdate.c b/usr.sbin/pw/psdate.c index 9b9cf78..5bdd3c9 100644 --- a/usr.sbin/pw/psdate.c +++ b/usr.sbin/pw/psdate.c @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: psdate.c,v 1.4 1997/10/10 06:23:32 charnier Exp $"; #endif /* not lint */ #include <stdio.h> @@ -180,8 +180,7 @@ parse_date(time_t dt, char const * str) ++str; if (numerics(str)) { - val = strtol(str, &p, 0); - dt = val ? val : dt; + dt = strtol(str, &p, 0); } else if (*str == '+' || *str == '-') { val = strtol(str, &p, 0); switch (*p) { |