summaryrefslogtreecommitdiffstats
path: root/pw
diff options
context:
space:
mode:
authorDavid Nugent <davidn@FreeBSD.org>1999-03-15 08:16:01 +0000
committerDavid Nugent <davidn@FreeBSD.org>1999-03-15 08:16:01 +0000
commit7876747ed935db3792e45bc51fed012859a86dda (patch)
tree6c1ac11cf80a2b77889377f46a3061f9659a8f34 /pw
parent3ac6f2f73aa5de1c99b76016bedf656a78c400a4 (diff)
downloadpw-darwin-7876747ed935db3792e45bc51fed012859a86dda.tar.gz
pw-darwin-7876747ed935db3792e45bc51fed012859a86dda.tar.zst
pw-darwin-7876747ed935db3792e45bc51fed012859a86dda.zip
Fix date parsing to allow '0' (none) date value.
Diffstat (limited to 'pw')
-rw-r--r--pw/psdate.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pw/psdate.c b/pw/psdate.c
index 9b9cf78..5bdd3c9 100644
--- a/pw/psdate.c
+++ b/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) {