mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +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:
committed by
Adhemerval Zanella
parent
83d4b42ded
commit
53fcdf5f74
@ -50,7 +50,7 @@ envz_entry (const char *envz, size_t envz_len, const char *name)
|
||||
envz++, envz_len--; /* skip '\0' */
|
||||
}
|
||||
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
libc_hidden_def (envz_entry)
|
||||
|
||||
@ -67,7 +67,7 @@ envz_get (const char *envz, size_t envz_len, const char *name)
|
||||
if (*entry)
|
||||
entry++;
|
||||
else
|
||||
entry = 0; /* A null entry. */
|
||||
entry = NULL; /* A null entry. */
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
Reference in New Issue
Block a user