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/dl-tunables.c | |
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/dl-tunables.c')
-rw-r--r-- | elf/dl-tunables.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c index 147cc4c..acf2d5d 100644 --- a/elf/dl-tunables.c +++ b/elf/dl-tunables.c @@ -252,7 +252,7 @@ parse_tunable_print_error (const struct tunable_toset_t *toset) static void parse_tunables (const char *valstring) { - struct tunable_toset_t tunables[tunables_list_size] = { 0 }; + struct tunable_toset_t tunables[tunables_list_size] = {}; if (parse_tunables_string (valstring, tunables) == -1) { _dl_error_printf ( @@ -301,7 +301,7 @@ __tunables_init (char **envp) return; enum { tunable_num_env_alias = array_length (tunable_env_alias_list) }; - struct tunable_toset_t tunables_env_alias[tunable_num_env_alias] = { 0 }; + struct tunable_toset_t tunables_env_alias[tunable_num_env_alias] = {}; while ((envp = get_next_env (envp, &envname, &envval, &prev_envp)) != NULL) { |