aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-04-18 06:46:21 -0700
committerChris Robinson <[email protected]>2014-04-18 06:54:18 -0700
commitc041a99f721b6ed7723f786b32f68f6ec1863042 (patch)
tree93fbd1999fcb14e56951b297bb0dac538c20e17d /Alc
parentb8d56190d1ab055a5d34f6ea27126098f0bd0370 (diff)
Simplify some error checking
Diffstat (limited to 'Alc')
-rw-r--r--Alc/threads.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/Alc/threads.c b/Alc/threads.c
index d9dabec1..81db4297 100644
--- a/Alc/threads.c
+++ b/Alc/threads.c
@@ -447,17 +447,11 @@ void almtx_destroy(almtx_t *mtx)
int almtx_timedlock(almtx_t *mtx, const struct timespec *ts)
{
- int ret;
-
- if(!mtx || !ts)
- return althrd_error;
-
- ret = pthread_mutex_timedlock(mtx, ts);
+ int ret = pthread_mutex_timedlock(mtx, ts);
switch(ret)
{
case 0: return althrd_success;
case ETIMEDOUT: return althrd_timedout;
- case EAGAIN:
case EBUSY: return althrd_busy;
}
return althrd_error;