]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Appease clang-tidy
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 19 Sep 2025 09:37:37 +0000 (11:37 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 19 Sep 2025 09:37:37 +0000 (11:37 +0200)
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
pdns/dnsdistdist/dnsdist-tcp-downstream.cc

index 93bc20c323c686f784fb4446b264b34b08e09b66..a57c1eb36e4be4779cc3c048e31a4acaabcdcd1b 100644 (file)
@@ -322,8 +322,8 @@ void TCPConnectionToBackend::handleReconnectionAttempt(std::shared_ptr<TCPConnec
         if (conn->d_state == State::sendingQueryToBackend) {
           /* we need to edit this query so it has the correct ID */
           auto query = std::move(conn->d_currentQuery);
-          uint16_t id = conn->d_highestStreamID;
-          prepareQueryForSending(query.d_query, id, ConnectionState::needProxy);
+          uint16_t streamId = conn->d_highestStreamID;
+          prepareQueryForSending(query.d_query, streamId, ConnectionState::needProxy);
           conn->d_currentQuery = std::move(query);
         }
 
@@ -340,8 +340,8 @@ void TCPConnectionToBackend::handleReconnectionAttempt(std::shared_ptr<TCPConnec
               TCPResponse response(std::move(pending.second.d_query));
               pending.second.d_sender->notifyIOError(now, std::move(response));
             }
-            catch (const std::exception& e) {
-              vinfolog("Got an exception while notifying: %s", e.what());
+            catch (const std::exception& exp) {
+              vinfolog("Got an exception while notifying: %s", exp.what());
             }
             catch (...) {
               vinfolog("Got exception while notifying");
@@ -369,7 +369,7 @@ void TCPConnectionToBackend::handleReconnectionAttempt(std::shared_ptr<TCPConnec
         connectionDied = false;
       }
     }
-    catch (const std::exception& e) {
+    catch (const std::exception& exp) {
       // reconnect might throw on failure, let's ignore that, we just need to know
       // it failed
     }