summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/nix-daemon/nix-daemon.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc
index b20225b3b0..7d26b61354 100644
--- a/nix/nix-daemon/nix-daemon.cc
+++ b/nix/nix-daemon/nix-daemon.cc
@@ -887,13 +887,11 @@ static void acceptConnection(int fdSocket)
if (remoteAddr.ss_family == AF_INET) {
struct sockaddr_in *addr = (struct sockaddr_in *) &remoteAddr;
- struct in_addr inaddr = { addr->sin_addr };
- result = inet_ntop(AF_INET, &inaddr,
+ result = inet_ntop(AF_INET, &addr->sin_addr,
address_str, sizeof address_str);
} else if (remoteAddr.ss_family == AF_INET6) {
struct sockaddr_in6 *addr = (struct sockaddr_in6 *) &remoteAddr;
- struct in6_addr inaddr = { addr->sin6_addr };
- result = inet_ntop(AF_INET6, &inaddr,
+ result = inet_ntop(AF_INET6, &addr->sin6_addr,
address_str, sizeof address_str);
} else {
result = NULL;