]> git.ipfire.org Git - thirdparty/shadow.git/commit
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)
commit1356b14a00cb48c5e18750c76f24dd7e1b112cbd
tree4f5b4f6307d9156012d57ecbe82e097fe20accc4
parenteffdb147868af6df3e645d82e2d7c3544f44a786
lib/defines.h: Don't wrap #undef in #ifdef

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