q66 pushed a commit to branch master.

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

commit d23b9342d5446b688db2187871817d9f0338aefa
Author: Daniel Kolesa <[email protected]>
Date:   Wed Nov 5 09:52:01 2014 +0000

    elua: remove redundant checks
---
 src/bin/elua/core/util.lua | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/bin/elua/core/util.lua b/src/bin/elua/core/util.lua
index d4175e1..b273054 100644
--- a/src/bin/elua/core/util.lua
+++ b/src/bin/elua/core/util.lua
@@ -79,10 +79,7 @@ local load_lib_win = function(libname, ev)
             succ, v = pcall(ffi.load, ev .. "\\lib" .. libname .. ".dll")
         end
     end
-    if not succ then
-        return false, v
-    end
-    return true, v
+    return succ, v
 end
 
 local load_lib = function(libname, ev)
@@ -95,10 +92,7 @@ local load_lib = function(libname, ev)
         local ext = (ffi.os == "OSX") and ".dylib" or ".so"
         succ, v = pcall(ffi.load, ev .. "/lib" .. libname .. ext)
     end
-    if not succ then
-        return false, v
-    end
-    return true, v
+    return succ, v
 end
 
 -- makes sure we only keep one handle for each lib

-- 


Reply via email to