mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-22 20:40:06 +01:00
Fix pthread return value checks
This commit is contained in:
parent
be2efb69b9
commit
13850f9927
2 changed files with 3 additions and 3 deletions
|
|
@ -589,7 +589,7 @@ void pa_check_signal_is_blocked(int sig) {
|
||||||
* blocked. Otherwise fall back to sigprocmask() */
|
* blocked. Otherwise fall back to sigprocmask() */
|
||||||
|
|
||||||
#ifdef HAVE_PTHREAD
|
#ifdef HAVE_PTHREAD
|
||||||
if (pthread_sigmask(SIG_SETMASK, NULL, &set) < 0) {
|
if (pthread_sigmask(SIG_SETMASK, NULL, &set) != 0) {
|
||||||
#endif
|
#endif
|
||||||
if (sigprocmask(SIG_SETMASK, NULL, &set) < 0) {
|
if (sigprocmask(SIG_SETMASK, NULL, &set) < 0) {
|
||||||
pa_log("sigprocmask(): %s", pa_cstrerror(errno));
|
pa_log("sigprocmask(): %s", pa_cstrerror(errno));
|
||||||
|
|
|
||||||
|
|
@ -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->thread_func = thread_func;
|
||||||
t->userdata = userdata;
|
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);
|
pa_xfree(t);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -224,7 +224,7 @@ pa_tls* pa_tls_new(pa_free_cb_t free_cb) {
|
||||||
|
|
||||||
t = pa_xnew(pa_tls, 1);
|
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);
|
pa_xfree(t);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue