git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1389
fefdeb5f-60dc-0310-8127-
8f9354f1896f
pthread_mutexattr_init(&attr);
if (recursive)
pthread_mutexattr_init(&attr);
if (recursive)
- if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE) < 0)
- return NULL;
+ ASSERT_SUCCESS(pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE));
m = pa_xnew(pa_mutex, 1);
m = pa_xnew(pa_mutex, 1);
- if (pthread_mutex_init(&m->mutex, &attr) < 0) {
- pa_xfree(m);
- return NULL;
- }
-
+ ASSERT_SUCCESS(pthread_mutex_init(&m->mutex, &attr));
ASSERT_SUCCESS(pthread_mutex_unlock(&m->mutex));
}
ASSERT_SUCCESS(pthread_mutex_unlock(&m->mutex));
}
pa_cond *pa_cond_new(void) {
pa_cond *c;
c = pa_xnew(pa_cond, 1);
pa_cond *pa_cond_new(void) {
pa_cond *c;
c = pa_xnew(pa_cond, 1);
- if (pthread_cond_init(&c->cond, NULL) < 0) {
- pa_xfree(c);
- return NULL;
- }
-
+ ASSERT_SUCCESS(pthread_cond_init(&c->cond, NULL));