commit e01ac82824ccd60b4a77498f8e49a443296fcba2
parent 827820f5580b8880939337772d85e59ae87721b6
Author: Quentin Rameau <quinq@fifth.space>
Date: Fri, 11 Oct 2019 17:05:57 +0200
Fix potential undefined socket value in connectto
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sacc.c b/sacc.c
@@ -461,7 +461,7 @@ connectto(const char *host, const char *port)
.ai_protocol = IPPROTO_TCP,
};
struct addrinfo *addrs, *addr;
- int sock, r;
+ int r, sock = -1;
sigfillset(&set);
sigprocmask(SIG_BLOCK, &set, &oset);