From 1e3d73e6edc93c06d55b5c4a7929bdb72c11f90a Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 28 Jun 2024 10:51:30 +0200 Subject: [PATCH] dnsdist: Do not implicitly convert count()'s `size_type` to `bool` --- pdns/dnsdistdist/dnsdist-web.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/dnsdist-web.cc b/pdns/dnsdistdist/dnsdist-web.cc index 122ea8147d..8d964500e7 100644 --- a/pdns/dnsdistdist/dnsdist-web.cc +++ b/pdns/dnsdistdist/dnsdist-web.cc @@ -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"; -- 2.47.2