* lib/sgetspent.c: Use SHADOW_SP_FLAG_UNSET for the initial

value of spwd.sp_flag.
This commit is contained in:
nekral-guest 2008-06-13 21:36:41 +00:00
parent c9679b7954
commit 92143eb7b9
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
* lib/sgetspent.c: Use SHADOW_SP_FLAG_UNSET for the initial
value of spwd.sp_flag.
2008-06-13 Nicolas François <nicolas.francois@centraliens.net> 2008-06-13 Nicolas François <nicolas.francois@centraliens.net>
* lib/getdef.h, lib/getdef.c: Add getdef_ulong(). * lib/getdef.h, lib/getdef.c: Add getdef_ulong().

View File

@ -147,7 +147,7 @@ struct spwd *sgetspent (const char *string)
spwd.sp_warn = -1; spwd.sp_warn = -1;
spwd.sp_inact = -1; spwd.sp_inact = -1;
spwd.sp_expire = -1; spwd.sp_expire = -1;
spwd.sp_flag = -1; spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
return &spwd; return &spwd;
} }
@ -200,7 +200,7 @@ struct spwd *sgetspent (const char *string)
if ((0 == spwd.sp_flag) && ('\0' != *cpp)) { if ((0 == spwd.sp_flag) && ('\0' != *cpp)) {
return 0; return 0;
} else if (fields[8][0] == '\0') { } else if (fields[8][0] == '\0') {
spwd.sp_flag = -1; spwd.sp_flag = SHADOW_SP_FLAG_UNSET;
} }
return (&spwd); return (&spwd);