Set DWORD sentLength = 0;

Same case like receive, we should initialize this variable.
This commit is contained in:
Maxim 2020-04-07 13:02:48 +02:00
parent 007b7d2a3f
commit 67cee4803a
2 changed files with 2 additions and 2 deletions

2
unix.c
View file

@ -475,7 +475,7 @@ enet_socket_receive (ENetSocket socket,
{ {
struct msghdr msgHdr; struct msghdr msgHdr;
struct sockaddr_in sin; struct sockaddr_in sin;
int recvLength = 0; int recvLength;
memset (& msgHdr, 0, sizeof (struct msghdr)); memset (& msgHdr, 0, sizeof (struct msghdr));

View file

@ -316,7 +316,7 @@ enet_socket_send (ENetSocket socket,
size_t bufferCount) size_t bufferCount)
{ {
struct sockaddr_in sin; struct sockaddr_in sin;
DWORD sentLength; DWORD sentLength = 0;
if (address != NULL) if (address != NULL)
{ {