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:
Alejandro Colomar
2024-08-22 22:51:57 -05:00
committed by Serge Hallyn
parent 683b3caa62
commit 6a2e298a5b
+1 -1
View File
@@ -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;
}