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
@@ -414,7 +414,7 @@ static void process_flags (int argc, char **argv)
break;
case 'g':
gflg = true;
if ( (get_gid (optarg, &group_newid) == 0)
if ( (get_gid(optarg, &group_newid) == -1)
|| (group_newid == (gid_t)-1)) {
fprintf (stderr,
_("%s: invalid group ID '%s'\n"),