From 13850f9927bf5fd95d1c573470be882436b3f18a Mon Sep 17 00:00:00 2001 From: Mikhail Anisimov Date: Fri, 5 Dec 2025 16:18:44 +0300 Subject: [PATCH] Fix pthread return value checks --- src/pulsecore/core-util.c | 2 +- src/pulsecore/thread-posix.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 5d2bae92f..be6ad73ce 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -589,7 +589,7 @@ void pa_check_signal_is_blocked(int sig) { * blocked. Otherwise fall back to sigprocmask() */ #ifdef HAVE_PTHREAD - if (pthread_sigmask(SIG_SETMASK, NULL, &set) < 0) { + if (pthread_sigmask(SIG_SETMASK, NULL, &set) != 0) { #endif if (sigprocmask(SIG_SETMASK, NULL, &set) < 0) { pa_log("sigprocmask(): %s", pa_cstrerror(errno)); diff --git a/src/pulsecore/thread-posix.c b/src/pulsecore/thread-posix.c index 62b0ec464..83c53a6f5 100644 --- a/src/pulsecore/thread-posix.c +++ b/src/pulsecore/thread-posix.c @@ -94,7 +94,7 @@ pa_thread* pa_thread_new(const char *name, pa_thread_func_t thread_func, void *u t->thread_func = thread_func; t->userdata = userdata; - if (pthread_create(&t->id, NULL, internal_thread_func, t) < 0) { + if (pthread_create(&t->id, NULL, internal_thread_func, t) != 0) { pa_xfree(t); return NULL; } @@ -224,7 +224,7 @@ pa_tls* pa_tls_new(pa_free_cb_t free_cb) { t = pa_xnew(pa_tls, 1); - if (pthread_key_create(&t->key, free_cb) < 0) { + if (pthread_key_create(&t->key, free_cb) != 0) { pa_xfree(t); return NULL; }