]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Delint dnsdist-protocols.cc
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 5 Mar 2024 09:50:35 +0000 (10:50 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 6 Mar 2024 11:10:06 +0000 (12:10 +0100)
pdns/dnsdistdist/dnsdist-protocols.cc

index 886e7ee42064654bdd5d73545f131d47d4e6420e..35da4711f41523786b3f7d808495b49bf48de63e 100644 (file)
@@ -47,14 +47,14 @@ const std::array<std::string, Protocol::s_numberOfProtocols> Protocol::s_prettyN
   "DNS over QUIC",
   "DNS over HTTP/3"};
 
-Protocol::Protocol(const std::string& s)
+Protocol::Protocol(const std::string& protocol)
 {
-  const auto& it = std::find(s_names.begin(), s_names.end(), s);
-  if (it == s_names.end()) {
-    throw std::runtime_error("Unknown protocol name: '" + s + "'");
+  const auto& namesIt = std::find(s_names.begin(), s_names.end(), protocol);
+  if (namesIt == s_names.end()) {
+    throw std::runtime_error("Unknown protocol name: '" + protocol + "'");
   }
 
-  auto index = std::distance(s_names.begin(), it);
+  auto index = std::distance(s_names.begin(), namesIt);
   d_protocol = static_cast<Protocol::typeenum>(index);
 }