From: Otto Moerbeek Date: Fri, 8 Mar 2019 13:52:05 +0000 (+0100) Subject: Zap the if (true); it apparently does not make anything clearer. X-Git-Tag: dnsdist-1.4.0-beta1~25^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d11e155d72741de292e507e7414341f3c1d7114f;p=thirdparty%2Fpdns.git Zap the if (true); it apparently does not make anything clearer. --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 29306d86e5..4aeef4d02d 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -690,15 +690,14 @@ vector 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(*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(*i)) { + ret.push_back(rec->getCA(53)); } } }