]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Deobfuscate a loop variable.
authorMiod Vallat <miod.vallat@powerdns.com>
Mon, 30 Jun 2025 10:24:59 +0000 (12:24 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Mon, 30 Jun 2025 10:24:59 +0000 (12:24 +0200)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
modules/lmdbbackend/lmdbbackend.cc

index 6ef36a44959256d93ec251801e8c78686334c46c..3cd273eaa3a9fa16d9f4347a8d981f1d748485c0 100644 (file)
@@ -2473,8 +2473,8 @@ bool LMDBBackend::getBeforeAndAfterNamesAbsolute(domainid_t id, const DNSName& q
       cursor.next(key, val);
   }
   //  cout<<"Now going forward"<<endl;
-  for (int count = 0;; ++count) {
-    if ((count && cursor.next(key, val)) || co.getDomainID(key.getNoStripHeader<StringView>()) != id) {
+  for (bool notFirst = false;; notFirst = true) {
+    if ((notFirst && cursor.next(key, val)) || co.getDomainID(key.getNoStripHeader<StringView>()) != id) {
       // cout <<"Hit end of database or zone, finding first hash then in zone "<<id<<endl;
       return getAfterForward(cursor, key, val, id, after);
     }