]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Remove ciEqual(), clone of pdns_iequals().
authorMiod Vallat <miod.vallat@powerdns.com>
Fri, 27 Jun 2025 09:20:29 +0000 (11:20 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Thu, 16 Apr 2026 12:28:48 +0000 (14:28 +0200)
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
modules/bindbackend/bindbackend2.cc

index b03275cf5fe378ef2bed37535940b13572470bce..979853d999a1cc60f1d34dc88378c2421cc2d44b 100644 (file)
@@ -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;
   }