From: Miod Vallat Date: Wed, 22 Oct 2025 12:56:51 +0000 (+0200) Subject: Move invariant test out of loop. X-Git-Tag: rec-5.4.0-beta1~72^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b41699e5124498281d16dcc230628b04033c36a;p=thirdparty%2Fpdns.git Move invariant test out of loop. Signed-off-by: Miod Vallat --- diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index 6cdfa09161..de6be0d9b7 100644 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -542,10 +542,10 @@ static void updateENT(const updateContext& ctx, set& insnonterm, setupdateEmptyNonTerminals(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); }