From: Robin Geuze Date: Wed, 12 Aug 2020 15:17:35 +0000 (+0200) Subject: Do an exact comapre, since set.count can only return 0 or 1 X-Git-Tag: dnsdist-1.6.0-alpha2~50^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8813%2Fhead;p=thirdparty%2Fpdns.git Do an exact comapre, since set.count can only return 0 or 1 --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index f5e298da3c..f5194473ef 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -724,7 +724,7 @@ static int checkZone(DNSSECKeeper &dk, UeberBackend &B, const DNSName& zone, con set messaged; for (const auto &value : metaData.second) { - if (seen.count(value) <= 0) { + if (seen.count(value) == 0) { seen.insert(value); } else if (messaged.count(value) <= 0) { cout << "[Error] Found duplicate metadata key value pair for zone " << zone << " with key '" << metaData.first << "' and value '" << value << "'" << endl;