From 84bf9406e5300602101da1dd8c05c62467cfded0 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 21 Aug 2014 05:03:27 -0400 Subject: splint/cppcheck/coverity cleanup. --- netlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'netlib.c') diff --git a/netlib.c b/netlib.c index 51b24e78..bf9e3e44 100644 --- a/netlib.c +++ b/netlib.c @@ -102,7 +102,7 @@ socket_t netlib_connectsock(int af, const char *host, const char *service, #ifndef S_SPLINT_S freeaddrinfo(result); #endif /* S_SPLINT_S */ - if (ret) + if (ret != 0 || s < 0) return ret; #ifdef IPTOS_LOWDELAY -- cgit v1.2.1