summaryrefslogtreecommitdiff
path: root/netlib.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-21 05:03:27 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-21 05:03:27 -0400
commit84bf9406e5300602101da1dd8c05c62467cfded0 (patch)
tree1b50e8c11d2a1ff4edda511f6cd5721c91b67d16 /netlib.c
parentde0863cfdbe13333745e27b8d58dc40fc8bca191 (diff)
downloadgpsd-84bf9406e5300602101da1dd8c05c62467cfded0.tar.gz
splint/cppcheck/coverity cleanup.
Diffstat (limited to 'netlib.c')
-rw-r--r--netlib.c2
1 files changed, 1 insertions, 1 deletions
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