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
@ -245,7 +245,7 @@ static void *
|
||||
realloc_check (void *oldmem, size_t bytes)
|
||||
{
|
||||
INTERNAL_SIZE_T chnb;
|
||||
void *newmem = 0;
|
||||
void *newmem = NULL;
|
||||
unsigned char *magic_p;
|
||||
size_t rb;
|
||||
|
||||
@ -254,7 +254,7 @@ realloc_check (void *oldmem, size_t bytes)
|
||||
__set_errno (ENOMEM);
|
||||
return NULL;
|
||||
}
|
||||
if (oldmem == 0)
|
||||
if (oldmem == NULL)
|
||||
return malloc_check (bytes);
|
||||
|
||||
if (bytes == 0)
|
||||
|
Reference in New Issue
Block a user