From: Charles-Henri Bruyand Date: Tue, 26 Dec 2023 13:20:38 +0000 (+0100) Subject: dnsdist: tidy variable name X-Git-Tag: auth-4.9.0-alpha1~17^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13664%2Fhead;p=thirdparty%2Fpdns.git dnsdist: tidy variable name --- 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);