From: Remi Gacogne Date: Mon, 20 Nov 2023 16:27:33 +0000 (+0100) Subject: dnsdist: Fix a few more clang-tidy warnings X-Git-Tag: rec-5.0.0-rc1~27^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=304a25ca87d8a83237e54098ef7d645eb250b03e;p=thirdparty%2Fpdns.git dnsdist: Fix a few more clang-tidy warnings --- diff --git a/pdns/dnsdist-lua-bindings.cc b/pdns/dnsdist-lua-bindings.cc index ff08875dcc..e6a821b31f 100644 --- a/pdns/dnsdist-lua-bindings.cc +++ b/pdns/dnsdist-lua-bindings.cc @@ -27,6 +27,7 @@ #include "dolog.hh" +// NOLINTNEXTLINE(readability-function-cognitive-complexity): this function declares Lua bindings, even with a good refactoring it will likely blow up the threshold void setupLuaBindings(LuaContext& luaCtx, bool client) { luaCtx.writeFunction("vinfolog", [](const string& arg) { @@ -357,7 +358,7 @@ void setupLuaBindings(LuaContext& luaCtx, bool client) } return Netmask(comboAddr); } - else if (addrOrStr.type() == typeid(std::string)) { + if (addrOrStr.type() == typeid(std::string)) { const auto& str = boost::get(addrOrStr); return Netmask(str); }