Fix potential undefined socket value in connectto - sacc - sacc(omys), simple console gopher client
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/
Log
Files
Refs
Tags
LICENSE
---
commit e01ac82824ccd60b4a77498f8e49a443296fcba2
parent 827820f5580b8880939337772d85e59ae87721b6
Author: Quentin Rameau 
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(-)
---
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);