From 53fcdf5f743aa9b02972eec658e66f96d6a63386 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 16 Nov 2024 16:51:31 +0100 Subject: 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: Link: Signed-off-by: Alejandro Colomar --- malloc/reallocarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'malloc/reallocarray.c') diff --git a/malloc/reallocarray.c b/malloc/reallocarray.c index 2a5f2a446d..0118f88253 100644 --- a/malloc/reallocarray.c +++ b/malloc/reallocarray.c @@ -27,7 +27,7 @@ __libc_reallocarray (void *optr, size_t nmemb, size_t elem_size) if (__builtin_mul_overflow (nmemb, elem_size, &bytes)) { __set_errno (ENOMEM); - return 0; + return NULL; } return realloc (optr, bytes); } -- cgit v1.2.3