* 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.
This commit is contained in:
nekral-guest 2008-06-13 21:09:14 +00:00
parent c3a380ade8
commit 186eef69dc
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
* 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 <nicolas.francois@centraliens.net>
* src/groupmod.c: The ID argument of audit_logger is an unsigned

View File

@ -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.