src/chage.c: print_day_as_date(): Handle errors from strfime(3)
Just like we do in day_to_str(). Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
6a2e298a5b
commit
60da937c2f
@@ -247,7 +247,11 @@ print_day_as_date(long day)
|
||||
return;
|
||||
}
|
||||
|
||||
STRFTIME(buf, iflg ? "%F" : "%b %d, %Y", &tm);
|
||||
if (STRFTIME(buf, iflg ? "%F" : "%b %d, %Y", &tm) == 0) {
|
||||
puts(_("future"));
|
||||
return;
|
||||
}
|
||||
|
||||
(void) puts (buf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user