zero out sin_zero

This commit is contained in:
eihrul 2008-02-24 14:19:47 +00:00
parent 356ff9bc7f
commit 3856e3fd15
2 changed files with 4 additions and 0 deletions

2
unix.c
View file

@ -274,6 +274,8 @@ enet_socket_send (ENetSocket socket,
if (address != NULL)
{
memset (& sin, 0, sizeof (struct sockaddr_in));
sin.sin_family = AF_INET;
sin.sin_port = ENET_HOST_TO_NET_16 (address -> port);
sin.sin_addr.s_addr = address -> host;

View file

@ -225,6 +225,8 @@ enet_socket_send (ENetSocket socket,
if (address != NULL)
{
memset (& sin, 0, sizeof (struct sockaddr_in));
sin.sin_family = AF_INET;
sin.sin_port = ENET_HOST_TO_NET_16 (address -> port);
sin.sin_addr.s_addr = address -> host;