string frontName = front->local.toString() + ":" + std::to_string(front->local.getPort()) + (front->udpFD >= 0 ? "_udp" : "_tcp");
boost::replace_all(frontName, ".", "_");
auto dupPair = frontendDuplicates.insert({frontName, 1});
- if (dupPair.second == false) {
+ if (!dupPair.second) {
frontName = frontName + "_" + std::to_string(dupPair.first->second);
- ++dupPair.first->second;
+ ++(dupPair.first->second);
}
const string base = namespace_name + "." + hostname + "." + instance_name + ".frontends." + frontName + ".";
boost::replace_all(name, "]", "_");
auto dupPair = dohFrontendDuplicates.insert({name, 1});
- if (dupPair.second == false) {
+ if (!dupPair.second) {
name = name + "_" + std::to_string(dupPair.first->second);
- ++dupPair.first->second;
+ ++(dupPair.first->second);
}
vector<pair<const char*, const std::atomic<uint64_t>&>> v{
string proto = (front->udpFD >= 0 ? "udp" : "tcp");
string fullName = frontName + "_" + proto;
auto dupPair = frontendDuplicates.insert({fullName, 1});
- if (dupPair.second == false) {
+ if (!dupPair.second) {
frontName = frontName + "_" + std::to_string(dupPair.first->second);
- ++dupPair.first->second;
+ ++(dupPair.first->second);
}
output << "dnsdist_frontend_queries{frontend=\"" << frontName << "\",proto=\"" << proto