From 2bffe0d58e0c8b7ee0ad57161ec65f2dd51dcd30 Mon Sep 17 00:00:00 2001 From: David Nugent Date: Mon, 15 Mar 1999 08:16:01 +0000 Subject: [PATCH] Fix date parsing to allow '0' (none) date value. --- usr.sbin/pw/psdate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/pw/psdate.c b/usr.sbin/pw/psdate.c index 9b9cf78bc9fd..5bdd3c9869e5 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 @@ -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) {