eina: fix CID 1106340: Logically dead code (DEADCODE) reported by coverity.
authorCedric BAIL <cedric@efl.so>
Mon, 14 Oct 2013 11:22:45 +0000 (13:22 +0200)
committerCedric BAIL <cedric@efl.so>
Mon, 14 Oct 2013 11:32:46 +0000 (13:32 +0200)
src/lib/eina/eina_inline_lock_posix.x

index 2e5b038..3d90929 100644 (file)
@@ -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