irc_login: csocket holds a valid descriptor or -1 on error
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- a/src/irc.c
+++ b/src/irc.c
@@ -62,12 +62,13 @@
break;
}
close (csocket);
+ csocket = -1;
}
if (result != NULL)
freeaddrinfo (result);
- if (csocket < 0) {
+ if (csocket == -1) {
perror ("Cannot connect");
return NULL;
}