eina: fix error reporting in cond_timedwait

Summary: EINA_FALSE was set into wrong variable.

Reviewers: jpeg, raster, Hermet, cedric

Reviewed By: cedric

Subscribers: NikaWhite

Differential Revision: https://phab.enlightenment.org/D4282

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Andrii Kroitor 2016-09-06 14:59:39 -07:00 committed by Cedric BAIL
parent a2e3b8ad13
commit 605694ed2a
1 changed files with 4 additions and 6 deletions

View File

@ -502,14 +502,12 @@ eina_condition_timedwait(Eina_Condition *cond, double t)
err = pthread_cond_timedwait(&(cond->condition),
&(cond->lock->mutex),
&ts);
if (err == 0) r = EINA_TRUE;
if (err == 0)
r = EINA_TRUE;
else if (err == EPERM)
err = EINA_FALSE;
eina_error_set(EPERM);
else if (err == ETIMEDOUT)
{
r = EINA_FALSE;
eina_error_set(ETIMEDOUT);
}
eina_error_set(ETIMEDOUT);
else EINA_LOCK_ABORT_DEBUG(err, cond_timedwait, cond);
#ifdef EINA_HAVE_DEBUG_THREADS