tFix potential undefined socket value in connectto - sacc - sacc (saccomys): simple gopher client.
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
DIR commit e01ac82824ccd60b4a77498f8e49a443296fcba2
DIR parent 827820f5580b8880939337772d85e59ae87721b6
HTML Author: Quentin Rameau <quinq@fifth.space>
Date: Fri, 11 Oct 2019 17:05:57 +0200
Fix potential undefined socket value in connectto
Diffstat:
M sacc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR diff --git a/sacc.c b/sacc.c
t@@ -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);