cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1c1b48ca64c4d13cfd3677cde1ee99e4cf6c2c15

commit 1c1b48ca64c4d13cfd3677cde1ee99e4cf6c2c15
Author: Cedric BAIL <ced...@efl.so>
Date:   Mon Oct 14 13:22:45 2013 +0200

    eina: fix CID 1106340: Logically dead code (DEADCODE) reported by coverity.
---
 src/lib/eina/eina_inline_lock_posix.x | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_inline_lock_posix.x 
b/src/lib/eina/eina_inline_lock_posix.x
index 2e5b038..3d90929 100644
--- a/src/lib/eina/eina_inline_lock_posix.x
+++ b/src/lib/eina/eina_inline_lock_posix.x
@@ -608,10 +608,11 @@ eina_spinlock_take(Eina_Spinlock *spinlock)
         {
            if (errno == EBUSY) sched_yield();
            else if (errno == EDEADLK) return EINA_LOCK_DEADLOCK;
+           else return EINA_LOCK_FAIL;
         }
    } while (t != 0);
 
-   return t ? EINA_LOCK_FAIL : EINA_LOCK_SUCCEED;
+   return EINA_LOCK_SUCCEED;
 #else
    return eina_lock_take(spinlock);
 #endif

-- 


Reply via email to