From: Alejandro Colomar Date: Wed, 31 Jul 2024 12:53:12 +0000 (+0200) Subject: src/chage.c: print_day_as_date(): Simplify error handling X-Git-Tag: 4.17.0-rc1~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a2e298a5bc596302aa8baaad7222eb8d0881ffe;p=thirdparty%2Fshadow.git 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 --- diff --git a/src/chage.c b/src/chage.c index c990953b5..95adb593d 100644 --- a/src/chage.c +++ b/src/chage.c @@ -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; }