ServerSocket: Initialize length variable

This commit is contained in:
Uli Schlachter 2013-01-29 15:05:44 +01:00 committed by Max Kellermann
parent 2bb751d9fa
commit a4223aac38

View File

@ -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);