From 186eef69dc765c9e09f9a5e1ce5eae296dbc8c72 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Fri, 13 Jun 2008 21:09:14 +0000 Subject: [PATCH] * src/passwd.c: Ignore return value of time() when use with a non NULL argument. * src/passwd.c: Cast number of days to a long integer. --- ChangeLog | 6 ++++++ src/passwd.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index daaa6655..9d523029 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-13 Nicolas François + + * src/passwd.c: Ignore return value of time() when use with a + non NULL argument. + * src/passwd.c: Cast number of days to a long integer. + 2008-06-13 Nicolas François * src/groupmod.c: The ID argument of audit_logger is an unsigned diff --git a/src/passwd.c b/src/passwd.c index 259731a4..eb10231e 100644 --- a/src/passwd.c +++ b/src/passwd.c @@ -365,7 +365,7 @@ static void check_password (const struct passwd *pw, const struct spwd *sp) return; } - time (&now); + (void) time (&now); /* * Expired accounts cannot be changed ever. Passwords which are @@ -588,7 +588,7 @@ static void update_shadow (void) nsp->sp_inact = (inact * DAY) / SCALE; } if (do_update_age) { - nsp->sp_lstchg = time ((time_t *) 0) / SCALE; + nsp->sp_lstchg = (long) time ((time_t *) 0) / SCALE; } if (lflg) { /* Set the account expiry field to 1.