summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2019-09-23 22:17:27 +0200
committerlouiz’ <louiz@louiz.org>2019-09-23 22:17:27 +0200
commit3339ce2cc0be9cc15a6cd9571025846edd1bef20 (patch)
tree0f3fd9917870fdd20998d55efc638dc152fc0ba9 /src/network
parentb7b54d8f0e08107508e7d74666a1bfb00e06aa5d (diff)
downloadbiboumi-3339ce2cc0be9cc15a6cd9571025846edd1bef20.tar.gz
biboumi-3339ce2cc0be9cc15a6cd9571025846edd1bef20.tar.bz2
biboumi-3339ce2cc0be9cc15a6cd9571025846edd1bef20.tar.xz
biboumi-3339ce2cc0be9cc15a6cd9571025846edd1bef20.zip
Trivial little naming changes
Diffstat (limited to 'src/network')
-rw-r--r--src/network/tcp_client_socket_handler.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/network/tcp_client_socket_handler.cpp b/src/network/tcp_client_socket_handler.cpp
index 9dda73d..6f67f02 100644
--- a/src/network/tcp_client_socket_handler.cpp
+++ b/src/network/tcp_client_socket_handler.cpp
@@ -46,15 +46,14 @@ void TCPClientSocketHandler::init_socket(const struct addrinfo* rp)
else
{
utils::ScopeGuard sg([result](){ freeaddrinfo(result); });
- struct addrinfo* rp;
- for (rp = result; rp; rp = rp->ai_next)
+ for (; result; result = result->ai_next)
{
if ((::bind(this->socket,
- reinterpret_cast<const struct sockaddr*>(rp->ai_addr),
- rp->ai_addrlen)) == 0)
+ reinterpret_cast<const struct sockaddr*>(result->ai_addr),
+ result->ai_addrlen)) == 0)
break;
}
- if (!rp)
+ if (!result)
log_error("Failed to bind socket to ", this->bind_addr, ": ",
strerror(errno));
else