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:
Alejandro Colomar
2023-12-02 00:23:06 +01:00
committed by Serge Hallyn
parent ea253cb275
commit 470baeabbd
6 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -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);