]> git.ipfire.org Git - thirdparty/shadow.git/commit
src/chage.c: Unify long overflow checks in print_day_as_date()
authorTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 14 Dec 2023 11:33:35 +0000 (12:33 +0100)
committerSerge Hallyn <serge@hallyn.com>
Tue, 13 Feb 2024 22:02:49 +0000 (16:02 -0600)
commit20100e4b22c318016cf5850a385baafa76acbd5c
tree27db97f6f83efa38356a12ba03fb5efb4543a85f
parent7eb10e6298aac1a36463009aafedb93e71df2fdb
src/chage.c: Unify long overflow checks in print_day_as_date()

The conversion from day to seconds can be done in print_date
(renamed to print_day_as_date for clarification).  This has the nice
benefit that DAY multiplication and long to time_t conversion are done
at just one place.

Co-developed-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Co-developed-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/chage.c