mgetgroups: avoid argument promotion issues with -1
authorEric Blake <ebb9@byu.net>
Fri, 4 Dec 2009 21:37:32 +0000 (14:37 -0700)
committerEric Blake <ebb9@byu.net>
Sat, 5 Dec 2009 01:02:51 +0000 (18:02 -0700)
commit3425a9dd708056d5e12483dd917af0c035b8b5bc
tree7d93a986a40c8c815841bb437ea6046223b37667
parentc5588be343f580be8e87d99e043dcdf3d7606759
mgetgroups: avoid argument promotion issues with -1

On platforms where gid_t is equivalent to uint16_t, argument
promotion states that -1 != (gid_t) -1.

* lib/mgetgroups.c (mgetgroups): A cast is required when checking
for invalid gid_t.
* tests/test-chown.h (getegid, test_chown): Likewise.
* tests/test-lchown.h (getegid, test_lchown): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/mgetgroups.c
tests/test-chown.h
tests/test-lchown.h