cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=605694ed2a5d351518597f199718ec3571d1082d

commit 605694ed2a5d351518597f199718ec3571d1082d
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Sep 6 14:59:39 2016 -0700

    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 <ced...@osg.samsung.com>
---
 src/lib/eina/eina_inline_lock_posix.x | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/lib/eina/eina_inline_lock_posix.x 
b/src/lib/eina/eina_inline_lock_posix.x
index d2e4b95..20ff9ec 100644
--- a/src/lib/eina/eina_inline_lock_posix.x
+++ b/src/lib/eina/eina_inline_lock_posix.x
@@ -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

-- 


Reply via email to