]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Do not implicitly convert count()'s `size_type` to `bool` 14395/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 28 Jun 2024 08:51:30 +0000 (10:51 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 28 Jun 2024 08:51:30 +0000 (10:51 +0200)
pdns/dnsdistdist/dnsdist-web.cc

index 122ea8147d21c9bcb900fb5bdbcd10cb25add27c..8d964500e7bd579168b42e3a347c65a12885648d 100644 (file)
@@ -516,7 +516,7 @@ static void handlePrometheus(const YaHTTP::Request& req, YaHTTP::Response& resp)
       // for these we have the help and types encoded in the sources
       // but we need to be careful about labels in custom metrics
       std::string helpName = prometheusMetricName.substr(0, prometheusMetricName.find('{'));
-      if (!helpAndTypeSent.count(helpName)) {
+      if (helpAndTypeSent.count(helpName) == 0) {
         helpAndTypeSent.insert(helpName);
         output << "# HELP " << helpName << " " << metricDetails.description << "\n";
         output << "# TYPE " << helpName << " " << prometheusTypeName << "\n";