]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
move assignment outside of condition
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 2 May 2023 12:16:44 +0000 (14:16 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Tue, 2 May 2023 12:16:44 +0000 (14:16 +0200)
modules/lmdbbackend/lmdbbackend.cc

index 219521978f3c1e340c115d75ff072adc8762a9b5..55f3d6baa120c55e89512be6896c1e0e1c976a4c 100644 (file)
@@ -1680,7 +1680,10 @@ void LMDBBackend::getAllDomainsFiltered(vector<DomainInfo>* domains, const std::
       DomainInfo di;
 
       // this get grabs the oldest item if there are duplicates
-      if (!(di.id = txn.get<0>(zone, di))) {
+      di.id = txn.get<0>(zone, di);
+
+      if (di.id == 0) {
+        // .get actually found nothing for us
         continue;
       }