aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-12-17 00:22:19 +0100
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2024-12-17 06:37:24 -0500
commitbd0ea9ff7e8d5f7d54112dfa96d541c3c60e36ae (patch)
treeebe1cbf41da5b79531f5e00dc2ce2eb36ec0bc4c
parent87cd94bba4091d22e24116298ade33b712ada235 (diff)
downloadglibc-bd0ea9ff7e8d5f7d54112dfa96d541c3c60e36ae.zip
glibc-bd0ea9ff7e8d5f7d54112dfa96d541c3c60e36ae.tar.gz
glibc-bd0ea9ff7e8d5f7d54112dfa96d541c3c60e36ae.tar.bz2
libio: Use NULL instead of 0 as a null pointer constant
This was missed in a recent global change. Fixes: 53fcdf5f743a (2024-11-25, "Silence most -Wzero-as-null-pointer-constant diagnostics") Reported-by: "Maciej W. Rozycki" <macro@redhat.com> Cc: Siddhesh Poyarekar <siddhesh@sourceware.org> Cc: Bruno Haible <bruno@clisp.org> Cc: Martin Uecker <uecker@tugraz.at> Cc: Xi Ruoyao <xry111@xry111.site> Cc: Florian Weimer <fweimer@redhat.com> Cc: Joseph Myers <josmyers@redhat.com> Signed-off-by: Alejandro Colomar <alx@kernel.org> Reviewed-by: Maciej W. Rozycki <macro@redhat.com>
-rw-r--r--libio/libioP.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/libio/libioP.h b/libio/libioP.h
index 34bf91f..70e2bdf 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -910,7 +910,8 @@ extern int _IO_vscanf (const char *, va_list) __THROW;
# ifdef _IO_USE_OLD_IO_FILE
# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
{ _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (FILE *) CHAIN, FD, \
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, \
+ NULL, NULL, (FILE *) CHAIN, FD, \
0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock }
# else
# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
@@ -924,14 +925,16 @@ extern int _IO_vscanf (const char *, va_list) __THROW;
# ifdef _IO_USE_OLD_IO_FILE
# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
{ _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (FILE *) CHAIN, FD, \
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, \
+ NULL, NULL, (FILE *) CHAIN, FD, \
0, _IO_pos_BAD }
# else
# define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
{ _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (FILE *) CHAIN, FD, \
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, \
+ NULL, NULL, (FILE *) CHAIN, FD, \
0, _IO_pos_BAD, 0, 0, { 0 }, 0, _IO_pos_BAD, \
- NULL, WDP, 0 }
+ NULL, WDP, NULL }
# endif
#endif