]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Move invariant test out of loop.
authorMiod Vallat <miod.vallat@powerdns.com>
Wed, 22 Oct 2025 12:56:51 +0000 (14:56 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Wed, 3 Dec 2025 06:50:46 +0000 (07:50 +0100)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
pdns/rfc2136handler.cc

index 6cdfa091616e8b243ac9b9c67a730a4bba19d350..de6be0d9b7fa51168ecc6169b6128e1a949cefdf 100644 (file)
@@ -542,10 +542,10 @@ static void updateENT(const updateContext& ctx, set<DNSName>& insnonterm, set<DN
     return;
   }
 
-  DLOG(g_log << ctx.msgPrefix << "Updating ENT records - " << insnonterm.size() << "|" << delnonterm.size() << endl);
+  DLOG(g_log << msgPrefix << "Updating ENT records - " << insnonterm.size() << "|" << delnonterm.size() << endl);
   ctx.di.backend->updateEmptyNonTerminals(ctx.di.id, insnonterm, delnonterm, false);
-  for (const auto& insert : insnonterm) {
-    if (ctx.haveNSEC3) {
+  if (ctx.haveNSEC3) {
+    for (const auto& insert : insnonterm) {
       DNSName ordername = computeOrdername(ctx, insert);
       ctx.di.backend->updateDNSSECOrderNameAndAuth(ctx.di.id, insert, ordername, true, QType::ANY, !ctx.narrow);
     }