From: Otto Moerbeek Date: Tue, 11 Feb 2025 13:18:25 +0000 (+0100) Subject: Apply suggestion X-Git-Tag: dnsdist-2.0.0-alpha1~110^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85302693c7bff37a19113708b38463575f6749dc;p=thirdparty%2Fpdns.git Apply suggestion Co-authored-by: Remi Gacogne --- diff --git a/pdns/recursordist/syncres.cc b/pdns/recursordist/syncres.cc index fd16be3007..53ff27f98f 100644 --- a/pdns/recursordist/syncres.cc +++ b/pdns/recursordist/syncres.cc @@ -5552,7 +5552,7 @@ bool SyncRes::doResolveAtThisIP(const std::string& prefix, const DNSName& qname, } accountAuthLatency(lwr.d_usec, remoteIP.sin4.sin_family); - if (lwr.d_rcode >= 0 && lwr.d_rcode < static_cast(rec::Counters::RCodeCounters::numberOfRCodes)) { + if (lwr.d_rcode >= 0 && lwr.d_rcode < static_cast(t_Counters.at(rec::RCode::auth).rcodeCounters.size())) { ++t_Counters.at(rec::RCode::auth).rcodeCounters.at(static_cast(lwr.d_rcode)); }