summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-11-05 09:52:01 +0000
committerDaniel Kolesa <d.kolesa@samsung.com>2014-11-05 09:52:01 +0000
commitd23b9342d5446b688db2187871817d9f0338aefa (patch)
tree108720f4f49a29120469f83f317efe2085b50701
parent1ea00af7e9a0a7bb373c71d50c02f29868de9517 (diff)
downloadefl-d23b9342d5446b688db2187871817d9f0338aefa.tar.gz
elua: remove redundant checks
-rw-r--r--src/bin/elua/core/util.lua10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/bin/elua/core/util.lua b/src/bin/elua/core/util.lua
index d4175e1e22..b273054177 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