diff options
Diffstat (limited to 'sbin/shutdown/shutdown.c')
-rw-r--r-- | sbin/shutdown/shutdown.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index 4e5697a5a47..52ed7cb6f86 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -1,4 +1,4 @@ -/* $OpenBSD: shutdown.c,v 1.20 2001/01/19 17:57:43 deraadt Exp $ */ +/* $OpenBSD: shutdown.c,v 1.21 2001/07/07 18:26:22 deraadt Exp $ */ /* $NetBSD: shutdown.c,v 1.9 1995/03/18 15:01:09 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94"; #else -static char rcsid[] = "$OpenBSD: shutdown.c,v 1.20 2001/01/19 17:57:43 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: shutdown.c,v 1.21 2001/07/07 18:26:22 deraadt Exp $"; #endif #endif /* not lint */ @@ -461,15 +461,16 @@ getoffset(timearg) } /* handle hh:mm by getting rid of the colon */ - for (p = timearg; *p; ++p) - if (!isascii(*p) || !isdigit(*p)) + for (p = timearg; *p; ++p) { + if (!isascii(*p) || !isdigit(*p)) { if (*p == ':' && strlen(p) == 3) { p[0] = p[1]; p[1] = p[2]; p[2] = '\0'; - } - else + } else badtime(); + } + } unsetenv("TZ"); /* OUR timezone */ lt = localtime(&now); /* current time val */ |