From: Remi Gacogne Date: Fri, 28 Jun 2024 08:51:30 +0000 (+0200) Subject: dnsdist: Do not implicitly convert count()'s `size_type` to `bool` X-Git-Tag: rec-5.2.0-alpha1~209^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F14395%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Do not implicitly convert count()'s `size_type` to `bool` --- 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";