summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r--lib/libthr/thread/thr_mutex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c
index da53c85..877bd37 100644
--- a/lib/libthr/thread/thr_mutex.c
+++ b/lib/libthr/thread/thr_mutex.c
@@ -631,7 +631,7 @@ __pthread_mutex_trylock(pthread_mutex_t *mutex)
} /* else {} */
if (robust)
_mutex_leave_robust(curthread, m);
- if ((ret == 0 || ret == EOWNERDEAD) &&
+ if (ret != 0 && ret != EOWNERDEAD &&
(m->m_flags & PMUTEX_FLAG_PRIVATE) != 0)
THR_CRITICAL_LEAVE(curthread);
return (ret);
OpenPOWER on IntegriCloud