]> git.ipfire.org Git - thirdparty/shadow.git/commit
Call NULL by its name
authorAlejandro Colomar <alx@kernel.org>
Wed, 1 Feb 2023 01:50:14 +0000 (02:50 +0100)
committerSerge Hallyn <serge@hallyn.com>
Thu, 2 Feb 2023 19:08:30 +0000 (13:08 -0600)
commit62172f6fb51519a8cf56e35e4ce2b76cc301a7fc
tree1016e12c12d43ef3afb54c2f97a8cee43babe404
parent1482224c546cabc3a08ec069c775b116171f182a
Call NULL by its name

In variadic functions we still do the cast.  In POSIX, it's not
necessary, since NULL is required to be of type 'void *', and 'void *'
is guaranteed to have the same alignment and representation as 'char *'.
However, since ISO C still doesn't mandate that, and moreover they're
doing dubious stuff by adding nullptr, let's be on the cautious side.
Also, C++ requires that NULL is _not_ 'void *', but either plain 0 or
some magic stuff.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
31 files changed:
lib/gshadow.c
lib/port.c
lib/sgetgrent.c
lib/shadow.c
libmisc/age.c
libmisc/entry.c
libmisc/env.c
libmisc/isexpired.c
libmisc/list.c
libmisc/loginprompt.c
libmisc/pwdcheck.c
libmisc/shell.c
libmisc/sulog.c
src/chfn.c
src/chgpasswd.c
src/chpasswd.c
src/faillog.c
src/gpasswd.c
src/groupdel.c
src/groupmod.c
src/lastlog.c
src/login.c
src/login_nopam.c
src/newgrp.c
src/newusers.c
src/pwck.c
src/su.c
src/sulogin.c
src/useradd.c
src/userdel.c
src/usermod.c