]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/defines.h: Don't wrap #undef in #ifdef
authorAlejandro Colomar <alx@kernel.org>
Fri, 12 Jan 2024 00:58:28 +0000 (01:58 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 15 Jan 2024 19:41:06 +0000 (13:41 -0600)
ISO C guarantees that #undef is a no-op if there is no such macro.

C11::6.10.3.5p2:
> A preprocessing directive of the form
>
>       # undef identifier new-line
>
> causes the specified identifier no longer to be defined as a macro
> name.  It is ignored if the specified identifier is not currently
> defined as a macro name.

Link: <http://port70.net/~nsz/c/c11/n1570.html#6.10.3.5p2>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/defines.h

index 361f89c651a69c292008d1fc83a2f2015aae4cfd..93543e85830d5f63d5cf9d83acf8be73d80e0095 100644 (file)
 #define SHADOW_SP_FLAG_UNSET ((unsigned long)-1)
 
 #ifdef WITH_AUDIT
-#ifdef __u8                    /* in case we use pam < 0.80 */
+/* in case we use pam < 0.80 */
 #undef __u8
-#endif
-#ifdef __u32
 #undef __u32
-#endif
 
 #include <libaudit.h>
 #endif