From a4223aac38a4c576d30be1b882fc340dfa8d68d6 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Tue, 29 Jan 2013 15:05:44 +0100 Subject: ServerSocket: Initialize length variable --- src/event/ServerSocket.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/event') diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx index d444933a0..8536774dc 100644 --- a/src/event/ServerSocket.cxx +++ b/src/event/ServerSocket.cxx @@ -304,7 +304,7 @@ ServerSocket::AddFD(int fd, GError **error_r) assert(fd >= 0); struct sockaddr_storage address; - socklen_t address_length; + socklen_t address_length = sizeof(address); if (getsockname(fd, (struct sockaddr *)&address, &address_length) < 0) { SetSocketError(error_r); -- cgit v1.2.3