From: Miod Vallat Date: Fri, 27 Jun 2025 09:20:29 +0000 (+0200) Subject: Remove ciEqual(), clone of pdns_iequals(). X-Git-Tag: auth-5.1.0-beta1~49^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=589fa1f38875a3abda7424f9f4097eb6d52ca446;p=thirdparty%2Fpdns.git Remove ciEqual(), clone of pdns_iequals(). Signed-off-by: Miod Vallat --- diff --git a/modules/bindbackend/bindbackend2.cc b/modules/bindbackend/bindbackend2.cc index b03275cf5f..979853d999 100644 --- a/modules/bindbackend/bindbackend2.cc +++ b/modules/bindbackend/bindbackend2.cc @@ -287,26 +287,10 @@ bool Bind2Backend::abortTransaction() return true; } -static bool ciEqual(const string& lhs, const string& rhs) -{ - if (lhs.size() != rhs.size()) { - return false; - } - - string::size_type pos = 0; - const string::size_type epos = lhs.size(); - for (; pos < epos; ++pos) { - if (dns_tolower(lhs[pos]) != dns_tolower(rhs[pos])) { - return false; - } - } - return true; -} - /** does domain end on suffix? Is smart about "wwwds9a.nl" "ds9a.nl" not matching */ static bool endsOn(const string& domain, const string& suffix) { - if (suffix.empty() || ciEqual(domain, suffix)) { + if (suffix.empty() || pdns_iequals(domain, suffix)) { return true; }