summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-05-11 04:55:33 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-05-11 04:55:33 -0400
commit43066eebf8d01d06d3fe38eccf96be917cdc1fc8 (patch)
tree84f1d5300975c604b0ff64ea752cfd4de111a327 /gpsd.c
parent51e25bd36ed91cefa7719b7abb01279fec649fd0 (diff)
downloadgpsd-43066eebf8d01d06d3fe38eccf96be917cdc1fc8.tar.gz
Coverity may be being overly fussy, but this guard is probably a good idea.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsd.c b/gpsd.c
index 00a67fe1..f1d3e146 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -434,7 +434,7 @@ static int passivesock_af(int af, char *service, char *tcp_or_udp, int qlen)
* this, trying to listen on in6addr_any will fail with the
* address-in-use error condition.
*/
- {
+ if (s > -1) {
int on = 1;
(void)setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on));
}