]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix a few more clang-tidy warnings 13518/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 20 Nov 2023 16:27:33 +0000 (17:27 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 20 Nov 2023 16:27:33 +0000 (17:27 +0100)
pdns/dnsdist-lua-bindings.cc

index ff08875dcc0cf32f5cb31bd688785155200b5d0d..e6a821b31f09f392914672f782ddc70b0fad4e15 100644 (file)
@@ -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<std::string>(addrOrStr);
       return Netmask(str);
     }