src/chage.c: print_day_as_date(): Simplify error handling
If localtime_r(3) fails, just print future, as we do in day_to_str(). It should only fail for unrealistic dates, if at all. Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
683b3caa62
commit
6a2e298a5b
@@ -243,7 +243,7 @@ print_day_as_date(long day)
|
||||
}
|
||||
|
||||
if (localtime_r(&date, &tm) == NULL) {
|
||||
(void) printf ("time_t: %lu\n", (unsigned long)date);
|
||||
puts(_("future"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user