]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Zap the if (true); it apparently does not make anything clearer.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 8 Mar 2019 13:52:05 +0000 (14:52 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 8 Mar 2019 13:52:05 +0000 (14:52 +0100)
pdns/syncres.cc

index 29306d86e5ff3709b246d09322b306bdb09e9feb..4aeef4d02d773d14e86c2b59fd82dabf200fd4e2 100644 (file)
@@ -690,15 +690,14 @@ vector<ComboAddress> SyncRes::getAddrs(const DNSName &qname, unsigned int depth,
   d_DNSSECValidationRequested = false;
   d_cacheonly = cacheOnly;
 
-  if (true) { // IPv4 always matters
-    vState newState = Indeterminate;
-    res_t res;
-    if (doResolve(qname, QType::A, res, depth+1, beenthere, newState) == 0) {  // this consults cache, OR goes out
-      for (res_t::const_iterator i = res.begin(); i != res.end(); ++i) {
-        if (i->d_type == QType::A) {
-          if (auto rec = getRR<ARecordContent>(*i)) {
-            ret.push_back(rec->getCA(53));
-          }
+  vState newState = Indeterminate;
+  res_t res;
+  // If IPv4 ever becomes second class, we should revisit this
+  if (doResolve(qname, QType::A, res, depth+1, beenthere, newState) == 0) {  // this consults cache, OR goes out
+    for (res_t::const_iterator i = res.begin(); i != res.end(); ++i) {
+      if (i->d_type == QType::A) {
+        if (auto rec = getRR<ARecordContent>(*i)) {
+          ret.push_back(rec->getCA(53));
         }
       }
     }