lib/, src/: get_gid(): Use the usual -1 as an error code
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
ea253cb275
commit
470baeabbd
+1
-1
@@ -239,7 +239,7 @@ static int add_group (const char *name, const char *gid, gid_t *ngid, uid_t uid)
|
||||
* new group, or an existing group.
|
||||
*/
|
||||
|
||||
if (get_gid (gid, &grent.gr_gid) == 0) {
|
||||
if (get_gid(gid, &grent.gr_gid) == -1) {
|
||||
fprintf (stderr,
|
||||
_("%s: invalid group ID '%s'\n"),
|
||||
Prog, gid);
|
||||
|
||||
Reference in New Issue
Block a user