1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

Silence most -Wzero-as-null-pointer-constant diagnostics

Replace 0 by NULL and {0} by {}.

Omit a few cases that aren't so trivial to fix.

Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117059>
Link: <https://software.codidact.com/posts/292718/292759#answer-292759>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2024-11-16 16:51:31 +01:00
committed by Adhemerval Zanella
parent 83d4b42ded
commit 53fcdf5f74
97 changed files with 263 additions and 262 deletions

View File

@@ -115,7 +115,7 @@ __spawni_child (void *arguments)
memset (&sa, '\0', sizeof (sa));
sigset_t hset;
__sigprocmask (SIG_BLOCK, 0, &hset);
__sigprocmask (SIG_BLOCK, NULL, &hset);
for (int sig = 1; sig < _NSIG; ++sig)
{
if ((attr->__flags & POSIX_SPAWN_SETSIGDEF)
@@ -129,7 +129,7 @@ __spawni_child (void *arguments)
sa.sa_handler = SIG_IGN;
else
{
__libc_sigaction (sig, 0, &sa);
__libc_sigaction (sig, NULL, &sa);
if (sa.sa_handler == SIG_IGN || sa.sa_handler == SIG_DFL)
continue;
sa.sa_handler = SIG_DFL;
@@ -138,7 +138,7 @@ __spawni_child (void *arguments)
else
continue;
__libc_sigaction (sig, &sa, 0);
__libc_sigaction (sig, &sa, NULL);
}
#ifdef _POSIX_PRIORITY_SCHEDULING
@@ -172,7 +172,7 @@ __spawni_child (void *arguments)
goto fail;
/* Execute the file actions. */
if (file_actions != 0)
if (file_actions != NULL)
{
int cnt;
struct rlimit64 fdlimit;