]> granicus.if.org Git - pdns/commitdiff
auth: Fix compilation of speedtest with GCC 8.0+
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 20 Feb 2019 16:02:13 +0000 (17:02 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 20 Feb 2019 16:02:13 +0000 (17:02 +0100)
pdns/speedtest.cc

index d613f1126409018814b37310bf58fa2154f4b2ee..1a504ef30232bb6826d8606fbf7bba7075f36688 100644 (file)
@@ -552,12 +552,11 @@ struct BigDNSPacketRefTest
 
 struct TCacheComp
 {
-  bool operator()(const pair<string, QType>& a, const pair<string, QType>& b) const
+  bool operator()(const pair<DNSName, QType>& a, const pair<DNSName, QType>& b) const
   {
-    int cmp=strcasecmp(a.first.c_str(), b.first.c_str());
-    if(cmp < 0)
+    if(a.first < b.first)
       return true;
-    if(cmp > 0)
+    if(b.first < a.first)
       return false;
 
     return a.second < b.second;