From: Miod Vallat Date: Thu, 26 Jun 2025 06:51:30 +0000 (+0200) Subject: Use pdns_ilexicographical_compare_three_way() in DNSName::canonCompare()... X-Git-Tag: rec-5.3.0-alpha2~40^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52444a0b0e6d86f4ba497302f98853843ed2d42e;p=thirdparty%2Fpdns.git Use pdns_ilexicographical_compare_three_way() in DNSName::canonCompare()... ...rather than two std::lexicographical_compare() calls. Signed-off-by: Miod Vallat --- diff --git a/pdns/dnsname.cc b/pdns/dnsname.cc index 04ba589c7e..f09f2b1e5f 100644 --- a/pdns/dnsname.cc +++ b/pdns/dnsname.cc @@ -498,25 +498,16 @@ bool DNSName::canonCompare(const DNSName& rhs) const ourcount--; rhscount--; - bool res=std::lexicographical_compare( - d_storage.c_str() + ourpos[ourcount] + 1, - d_storage.c_str() + ourpos[ourcount] + 1 + *(d_storage.c_str() + ourpos[ourcount]), - rhs.d_storage.c_str() + rhspos[rhscount] + 1, - rhs.d_storage.c_str() + rhspos[rhscount] + 1 + *(rhs.d_storage.c_str() + rhspos[rhscount]), - DNSNameCompare()); - - // cout<<"Forward: "<