shutdown: Fix r327476 by adding init

Initialize maybe_today. While here sort.

PR:				32411
Additionally reported by:	rgrimes, ian
This commit is contained in:
eadler 2018-01-02 09:02:42 +00:00
parent a435c492d3
commit 1057416f98

View File

@ -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: