mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 02:32:47 +00:00
shutdown: Fix r327476 by adding init
Initialize maybe_today. While here sort. PR: 32411 Additionally reported by: rgrimes, ian
This commit is contained in:
parent
8befcf7be1
commit
7d3df1907a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327488
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user