* lib/get_gid.c: gidstr should not be NULL, but the check was

meant to make sure it is not empty.
	* lib/get_uid.c: Likewise.
This commit is contained in:
nekral-guest 2009-04-23 11:46:06 +00:00
parent 7b562d96b3
commit 0c6159650d
3 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,15 @@
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* lib/get_gid.c: gidstr should not be NULL, but the check was
meant to make sure it is not empty.
* lib/get_uid.c: Likewise.
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* lib/getdef.c: Added splint annotations.
* lib/getdef.c: Ignore fputs() return value.
* lib/getdef.c: Use EXIT_FAILURE / EXIT_SUCCESS for exit()
2009-04-22 Nicolas François <nicolas.francois@centraliens.net> 2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* src/faillog.c: Added splint annotations. * src/faillog.c: Added splint annotations.

View File

@ -41,7 +41,7 @@ int get_gid (const char *gidstr, gid_t *gid)
errno = 0; errno = 0;
val = strtoll (gidstr, &endptr, 10); val = strtoll (gidstr, &endptr, 10);
if ( ('\0' == gidstr) if ( ('\0' == *gidstr)
|| ('\0' != *endptr) || ('\0' != *endptr)
|| (ERANGE == errno) || (ERANGE == errno)
|| (val != (gid_t)val)) { || (val != (gid_t)val)) {

View File

@ -41,7 +41,7 @@ int get_uid (const char *uidstr, uid_t *uid)
errno = 0; errno = 0;
val = strtoll (uidstr, &endptr, 10); val = strtoll (uidstr, &endptr, 10);
if ( ('\0' == uidstr) if ( ('\0' == *uidstr)
|| ('\0' != *endptr) || ('\0' != *endptr)
|| (ERANGE == errno) || (ERANGE == errno)
|| (val != (uid_t)val)) { || (val != (uid_t)val)) {