From 1057416f9854d015ebe2d245fa3bf5acc22dfc71 Mon Sep 17 00:00:00 2001 From: eadler Date: Tue, 2 Jan 2018 09:02:42 +0000 Subject: [PATCH] shutdown: Fix r327476 by adding init Initialize maybe_today. While here sort. PR: 32411 Additionally reported by: rgrimes, ian --- sbin/shutdown/shutdown.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index 622b99fa2fa3..67a433b8edde 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -431,7 +431,7 @@ getoffset(char *timearg) struct tm *lt; char *p; time_t now; - int this_year, maybe_today; + int maybe_today, this_year; char *timeunit; (void)time(&now); @@ -482,6 +482,7 @@ getoffset(char *timearg) unsetenv("TZ"); /* OUR timezone */ lt = localtime(&now); /* current time val */ + maybe_today = 1; switch(strlen(timearg)) { case 10: