From 2196efc90c5b2ebb4ba68ed32e8ff5e331d36492 Mon Sep 17 00:00:00 2001 From: raspopov Date: Tue, 27 Oct 2020 18:57:45 +0300 Subject: [PATCH] Fixed paranoid VS2017 compilation error of uninitialized variable (was a warning before). Signed-off-by: raspopov --- lib/net_mosq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/net_mosq.c b/lib/net_mosq.c index 35650024..c117d5fd 100644 --- a/lib/net_mosq.c +++ b/lib/net_mosq.c @@ -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;