fix "may be used uninitialized in this function" warning

This commit is contained in:
Brad Parker 2017-10-28 16:01:29 -04:00
parent 1842471eb1
commit bbf6f2f451

View File

@ -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,