src/gpasswd.c: Simplify cpp conditional

Since failure() is [[noreturn]], we can invert the conditional so that
we don't need an else.  This silences a -Wunused-parameter warning.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2023-09-02 16:19:58 +02:00
committed by Iker Pedrosa
parent 0c1ca49be3
commit 62772039b7
+3 -4
View File
@@ -726,15 +726,14 @@ static void check_perms (const struct group *gr)
* first group member might be just a normal user.
* --marekm
*/
#if defined(FIRST_MEMBER_IS_ADMIN)
#if !defined(FIRST_MEMBER_IS_ADMIN)
failure();
#endif
if (gr->gr_mem[0] == NULL)
failure();
if (strcmp(gr->gr_mem[0], myname) != 0)
failure();
#else /* ! FIRST_MEMBER_IS_ADMIN */
failure();
#endif
}
}