diff --git a/ChangeLog b/ChangeLog index 0b475c7d..f76d16d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-04-30 Nicolas François + + * libmisc/getgr_nam_gid.c, lib/get_gid.c, lib/get_pid.c, + lib/get_uid.c: Added splint annotations. + 2009-04-30 Nicolas François * lib/exitcodes.h: Define E_SUCCESS as EXIT_SUCCESS. Added FIXMEs. diff --git a/lib/get_gid.c b/lib/get_gid.c index d13b95ad..6fb31ffe 100644 --- a/lib/get_gid.c +++ b/lib/get_gid.c @@ -44,7 +44,7 @@ int get_gid (const char *gidstr, gid_t *gid) if ( ('\0' == *gidstr) || ('\0' != *endptr) || (ERANGE == errno) - || (val != (gid_t)val)) { + || (/*@+longintegral@*/val != (gid_t)val)/*@=longintegral@*/) { return 0; } diff --git a/lib/get_pid.c b/lib/get_pid.c index 0918421d..e2b47ce5 100644 --- a/lib/get_pid.c +++ b/lib/get_pid.c @@ -44,7 +44,7 @@ int get_pid (const char *pidstr, pid_t *pid) if ( ('\0' == *pidstr) || ('\0' != *endptr) || (ERANGE == errno) - || (val != (pid_t)val)) { + || (/*@+longintegral@*/val != (pid_t)val)/*@=longintegral@*/) { return 0; } diff --git a/lib/get_uid.c b/lib/get_uid.c index dd90bad3..ac0f2df3 100644 --- a/lib/get_uid.c +++ b/lib/get_uid.c @@ -44,7 +44,7 @@ int get_uid (const char *uidstr, uid_t *uid) if ( ('\0' == *uidstr) || ('\0' != *endptr) || (ERANGE == errno) - || (val != (uid_t)val)) { + || (/*@+longintegral@*/val != (uid_t)val)/*@=longintegral@*/) { return 0; } diff --git a/libmisc/getgr_nam_gid.c b/libmisc/getgr_nam_gid.c index b0ca8c6c..39e44193 100644 --- a/libmisc/getgr_nam_gid.c +++ b/libmisc/getgr_nam_gid.c @@ -58,7 +58,7 @@ extern /*@null@*/struct group *getgr_nam_gid (const char *grname) if ( ('\0' != *grname) && ('\0' == *endptr) && (ERANGE != errno) - && (gid == (gid_t)gid)) { + && (/*@+longintegral@*/gid == (gid_t)gid)/*@=longintegral@*/) { return xgetgrgid ((gid_t) gid); } return xgetgrnam (grname);