From bbf6f2f45183f1722887b90e60402e46c5647493 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sat, 28 Oct 2017 16:01:29 -0400 Subject: [PATCH] fix "may be used uninitialized in this function" warning --- network/netplay/netplay_init.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/network/netplay/netplay_init.c b/network/netplay/netplay_init.c index e6f4a4ac8e..cae0ddda37 100644 --- a/network/netplay/netplay_init.c +++ b/network/netplay/netplay_init.c @@ -184,7 +184,11 @@ static bool init_tcp_socket(netplay_t *netplay, void *direct_host, while (tmp_info) { struct sockaddr_storage sad; - int fd = init_tcp_connection( + int fd; + + memset(&sad, 0, sizeof(sad)); + + fd = init_tcp_connection( tmp_info, direct_host || server, (struct sockaddr*)&sad,