From 37088b763d2fd4495b7194b1fd8accbdf5902e1b Mon Sep 17 00:00:00 2001 From: Charles-Henri Bruyand Date: Tue, 26 Dec 2023 14:20:38 +0100 Subject: [PATCH] dnsdist: tidy variable name --- pdns/iputils.cc | 12 ++++++------ pdns/iputils.hh | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pdns/iputils.cc b/pdns/iputils.cc index e52755670b..2f629cbfa1 100644 --- a/pdns/iputils.cc +++ b/pdns/iputils.cc @@ -538,33 +538,33 @@ void setSocketSendBuffer(int fd, uint32_t size) setSocketBuffer(fd, SO_SNDBUF, size); } -static uint32_t raiseSocketBufferToMax(int fd, int optname, const std::string& readMaxFromFile) +static uint32_t raiseSocketBufferToMax(int socket, int optname, const std::string& readMaxFromFile) { std::ifstream ifs(readMaxFromFile); if (ifs) { std::string line; if (getline(ifs, line)) { auto max = pdns::checked_stoi(line); - setSocketBuffer(fd, optname, max); + setSocketBuffer(socket, optname, max); return max; } } return 0; } -uint32_t raiseSocketReceiveBufferToMax(int fd) +uint32_t raiseSocketReceiveBufferToMax(int socket) { #ifdef __linux__ - return raiseSocketBufferToMax(fd, SO_RCVBUF, "/proc/sys/net/core/rmem_max"); + return raiseSocketBufferToMax(socket, SO_RCVBUF, "/proc/sys/net/core/rmem_max"); #else return 0; #endif } -uint32_t raiseSocketSendBufferToMax(int fd) +uint32_t raiseSocketSendBufferToMax(int socket) { #ifdef __linux__ - return raiseSocketBufferToMax(fd, SO_SNDBUF, "/proc/sys/net/core/wmem_max"); + return raiseSocketBufferToMax(socket, SO_SNDBUF, "/proc/sys/net/core/wmem_max"); #else return 0; #endif diff --git a/pdns/iputils.hh b/pdns/iputils.hh index 7f0159e552..2a5b21544e 100644 --- a/pdns/iputils.hh +++ b/pdns/iputils.hh @@ -1729,5 +1729,5 @@ std::vector getListOfRangesOfNetworkInterface(const std::string& itf); void setSocketBuffer(int fd, int optname, uint32_t size); void setSocketReceiveBuffer(int fd, uint32_t size); void setSocketSendBuffer(int fd, uint32_t size); -uint32_t raiseSocketReceiveBufferToMax(int fd); -uint32_t raiseSocketSendBufferToMax(int fd); +uint32_t raiseSocketReceiveBufferToMax(int socket); +uint32_t raiseSocketSendBufferToMax(int socket); -- 2.47.2