localtime() does not return NULL
This commit is contained in:
parent
c3f10f08f2
commit
22c02149f9
|
@ -41,8 +41,8 @@ static int _who(Prefs * prefs)
|
|||
printf(" %c", '?');
|
||||
printf(" %-8s", u->ut_line);
|
||||
t = u->ut_tv.tv_sec;
|
||||
if((tm = localtime(&t)) == NULL || strftime(buf, sizeof(buf),
|
||||
"%b %e %H:%M", tm) == 0)
|
||||
tm = localtime(&t);
|
||||
if(strftime(buf, sizeof(buf), "%b %e %H:%M", tm) == 0)
|
||||
strcpy(buf, "n/a");
|
||||
printf(" %s\n", buf);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user