From a76e729b0d7e50579b2e9ea8cdf226059cf98301 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 9 Dec 2016 17:20:57 -0600 Subject: [PATCH] Trivial, cosmetic --- sched/pthread/pthread_condwait.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sched/pthread/pthread_condwait.c b/sched/pthread/pthread_condwait.c index 65eadfc131..631e6c2679 100644 --- a/sched/pthread/pthread_condwait.c +++ b/sched/pthread/pthread_condwait.c @@ -81,7 +81,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) /* Make sure that non-NULL references were provided. */ - if (!cond || !mutex) + if (cond == NULL || mutex == NULL) { ret = EINVAL; } @@ -111,7 +111,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) sinfo("Reacquire mutex...\n"); ret |= pthread_takesemaphore((FAR sem_t *)&mutex->sem); - if (!ret) + if (ret == OK) { mutex->pid = getpid(); }