diff options
-rw-r--r-- | toxcore/TCP_client.h | 2 | ||||
-rw-r--r-- | toxcore/network.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/TCP_client.h b/toxcore/TCP_client.h index 8a698869..90002214 100644 --- a/toxcore/TCP_client.h +++ b/toxcore/TCP_client.h | |||
@@ -58,7 +58,7 @@ enum { | |||
58 | }; | 58 | }; |
59 | typedef struct { | 59 | typedef struct { |
60 | uint8_t status; | 60 | uint8_t status; |
61 | Socket sock; | 61 | Socket sock; |
62 | #ifdef HAVE_LIBEV | 62 | #ifdef HAVE_LIBEV |
63 | struct { | 63 | struct { |
64 | ev_io listener; | 64 | ev_io listener; |
diff --git a/toxcore/network.c b/toxcore/network.c index f74363e6..a68e91f4 100644 --- a/toxcore/network.c +++ b/toxcore/network.c | |||
@@ -674,6 +674,8 @@ Networking_Core *new_networking_ex(Logger *log, IP ip, uint16_t port_from, uint1 | |||
674 | struct sockaddr_storage addr; | 674 | struct sockaddr_storage addr; |
675 | size_t addrsize; | 675 | size_t addrsize; |
676 | 676 | ||
677 | memset(&addr, 0, sizeof(struct sockaddr_storage)); | ||
678 | |||
677 | if (temp->family == AF_INET) { | 679 | if (temp->family == AF_INET) { |
678 | struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr; | 680 | struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr; |
679 | 681 | ||