shutdown: Fix r327476 by adding init

Initialize maybe_today. While here sort.

PR:				32411
Additionally reported by:	rgrimes, ian
This commit is contained in:
Eitan Adler 2018-01-02 09:02:42 +00:00
parent 8befcf7be1
commit 7d3df1907a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327488

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: