diff options
author | Alejandro Colomar <alx@kernel.org> | 2024-11-16 16:51:31 +0100 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-11-25 16:45:59 -0300 |
commit | 53fcdf5f743aa9b02972eec658e66f96d6a63386 (patch) | |
tree | e1bd3ed90d89027abe4b8ba6f0dbffd833f08a9b /elf/tlsdeschtab.h | |
parent | 83d4b42ded712bbbc22ceeefe886b8315190da5b (diff) | |
download | glibc-53fcdf5f743aa9b02972eec658e66f96d6a63386.zip glibc-53fcdf5f743aa9b02972eec658e66f96d6a63386.tar.gz glibc-53fcdf5f743aa9b02972eec658e66f96d6a63386.tar.bz2 |
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>
Diffstat (limited to 'elf/tlsdeschtab.h')
-rw-r--r-- | elf/tlsdeschtab.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/elf/tlsdeschtab.h b/elf/tlsdeschtab.h index 07e1098..0b1b7ce 100644 --- a/elf/tlsdeschtab.h +++ b/elf/tlsdeschtab.h @@ -93,7 +93,7 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset) { ht = htab_create (); if (! ht) - return 0; + return NULL; map->l_mach.tlsdesc_table = ht; } @@ -101,7 +101,7 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset) test.tlsinfo.ti_offset = ti_offset; entry = htab_find_slot (ht, &test, 1, hash_tlsdesc, eq_tlsdesc); if (! entry) - return 0; + return NULL; if (*entry) { @@ -111,7 +111,7 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset) *entry = td = malloc (sizeof (struct tlsdesc_dynamic_arg)); if (! td) - return 0; + return NULL; /* This may be higher than the map's generation, but it doesn't matter much. Worst case, we'll have one extra DTV update per thread. */ |