diff --git a/ChangeLog b/ChangeLog index ccf4fd90..8678a011 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-06-13 Nicolas François + + * libmisc/pwd2spwd.c: Cast number of days to a long integer. + * libmisc/pwd2spwd.c: Use SHADOW_SP_FLAG_UNSET for the initial + value of sp.sp_flag. + 2008-06-13 Nicolas François * lib/defines.h: Include since it uses the macro that diff --git a/libmisc/pwd2spwd.c b/libmisc/pwd2spwd.c index fd5b35a5..1c41513b 100644 --- a/libmisc/pwd2spwd.c +++ b/libmisc/pwd2spwd.c @@ -64,7 +64,7 @@ struct spwd *pwd_to_spwd (const struct passwd *pw) */ sp.sp_min = 0; sp.sp_max = (10000L * DAY) / SCALE; - sp.sp_lstchg = time ((time_t *) 0) / SCALE; + sp.sp_lstchg = (long) time ((time_t *) 0) / SCALE; } /* @@ -74,7 +74,7 @@ struct spwd *pwd_to_spwd (const struct passwd *pw) sp.sp_warn = -1; sp.sp_expire = -1; sp.sp_inact = -1; - sp.sp_flag = -1; + sp.sp_flag = SHADOW_SP_FLAG_UNSET; return &sp; }