aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-11-16 16:51:31 +0100
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-11-25 16:45:59 -0300
commit53fcdf5f743aa9b02972eec658e66f96d6a63386 (patch)
treee1bd3ed90d89027abe4b8ba6f0dbffd833f08a9b /nptl
parent83d4b42ded712bbbc22ceeefe886b8315190da5b (diff)
downloadglibc-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 'nptl')
-rw-r--r--nptl/pthread_create.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index ef3ec33..a6254b1 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -239,7 +239,7 @@ static int create_thread (struct pthread *pd, const struct pthread_attr *attr,
stopped since we have to set the scheduling parameters or set the
affinity. */
bool need_setaffinity = (attr != NULL && attr->extension != NULL
- && attr->extension->cpuset != 0);
+ && attr->extension->cpuset != NULL);
if (attr != NULL
&& (__glibc_unlikely (need_setaffinity)
|| __glibc_unlikely ((attr->flags & ATTR_FLAG_NOTINHERITSCHED) != 0)))