From: bert hubert Date: Thu, 17 Dec 2015 10:32:50 +0000 (+0100) Subject: silence a luawrapper warning. Hope I got it right. X-Git-Tag: dnsdist-1.0.0-alpha1~45^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1752ce2b897bbdc418f437f21ef5f23c1c9296bd;p=pdns silence a luawrapper warning. Hope I got it right. --- diff --git a/ext/luawrapper/include/LuaContext.hpp b/ext/luawrapper/include/LuaContext.hpp index 0794b2e81..f247eef7a 100644 --- a/ext/luawrapper/include/LuaContext.hpp +++ b/ext/luawrapper/include/LuaContext.hpp @@ -2500,7 +2500,7 @@ struct LuaContext::Reader< static auto read(lua_State* state, int index) -> boost::optional { - if (!lua_isnumber(state, index) != 0 || fmod(lua_tonumber(state, index), 1.) != 0) + if (!lua_isnumber(state, index) || fmod(lua_tonumber(state, index), 1.) != 0) return boost::none; return static_cast(lua_tointeger(state, index)); }