aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/at/parsetime.c
diff options
context:
space:
mode:
authorAlexander Langer <alex@FreeBSD.org>1998-08-08 14:02:06 +0000
committerAlexander Langer <alex@FreeBSD.org>1998-08-08 14:02:06 +0000
commit1f939e3414cc187147970e4fa016bf2d7dff8e32 (patch)
tree442bdf9d7746abf1468e5eda5705a51edda5190d /usr.bin/at/parsetime.c
parent1cfd4a8b6621761a2fab34fcd0b1b36fcc556817 (diff)
downloadsrc-1f939e3414cc187147970e4fa016bf2d7dff8e32.tar.gz
src-1f939e3414cc187147970e4fa016bf2d7dff8e32.zip
Year is sometimes set to -1 when assign_date() is called. Check for -1
before Y2K processing. PR: 7524
Notes
Notes: svn path=/head/; revision=38188
Diffstat (limited to 'usr.bin/at/parsetime.c')
-rw-r--r--usr.bin/at/parsetime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/at/parsetime.c b/usr.bin/at/parsetime.c
index ed6ba2336229..9e54bbb82ae9 100644
--- a/usr.bin/at/parsetime.c
+++ b/usr.bin/at/parsetime.c
@@ -143,7 +143,7 @@ static size_t sc_len; /* scanner - lenght of token buffer */
static int sc_tokid; /* scanner - token id */
static int sc_tokplur; /* scanner - is token plural? */
-static char rcsid[] = "$Id: parsetime.c,v 1.12 1998/05/05 01:53:15 alex Exp $";
+static char rcsid[] = "$Id: parsetime.c,v 1.13 1998/07/09 22:51:59 des Exp $";
/* Local functions */
@@ -421,7 +421,7 @@ assign_date(struct tm *tm, long mday, long mon, long year)
year -= 1900;
else
panic("garbled time");
- } else {
+ } else if (year != -1) {
struct tm *lt;
time_t now;