From: nekral-guest Date: Fri, 13 Jun 2008 21:09:14 +0000 (+0000) Subject: * src/passwd.c: Ignore return value of time() when use with a X-Git-Tag: 4.1.3~370 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=186eef69dc765c9e09f9a5e1ce5eae296dbc8c72;p=shadow * 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. --- 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.