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:
committed by
Iker Pedrosa
parent
0c1ca49be3
commit
62772039b7
+3
-4
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user