Recently Written · git

sacc

Mirror of git://bitreich.org/sacc, the sacc gopher client from bitreich.org.

git clone https://github.com/equwal/sacc

Log | Files | Refs


commit e01ac82824ccd60b4a77498f8e49a443296fcba2
Quentin Rameau <quinq@fifth.space>
2019-10-11 17:05:57 +0200

Fix potential undefined socket value in connectto

 sacc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sacc.c b/sacc.c
index c658933..98a4927 100644
--- 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);