Fixed paranoid VS2017 compilation error of uninitialized variable (was a warning before).

Signed-off-by: raspopov <raspopov@cherubicsoft.com>
This commit is contained in:
raspopov 2020-10-27 18:57:45 +03:00 committed by Roger Light
parent 53d63fe922
commit 2196efc90c

View File

@ -377,6 +377,8 @@ int net__try_connect(const char *host, uint16_t port, mosq_sock_t *sock, const c
uint32_t val = 1;
#endif
ainfo_bind = NULL;
*sock = INVALID_SOCKET;
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC;