]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Hopefully make clang-tidy happy 13191/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 13 Nov 2023 13:23:55 +0000 (14:23 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 13 Nov 2023 13:23:55 +0000 (14:23 +0100)
pdns/dnsdist-lua.cc

index 2f2dce84510d13574ee5a9b1e5e082c9763cf2a1..2b47f26007f7a4a65028d14e470830e62d5fa259 100644 (file)
@@ -1880,9 +1880,10 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck)
 
         if (boost::ends_with(ent->d_name, ".conf")) {
           std::ostringstream namebuf;
+          // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay): this is what dirent is
           namebuf << dirname << "/" << ent->d_name;
 
-          if (stat(namebuf.str().c_str(), &st) || !S_ISREG(st.st_mode)) {
+          if (stat(namebuf.str().c_str(), &st) != 0 || !S_ISREG(st.st_mode)) {
             continue;
           }