From 2048b4ee2c360726f610c321095868a2e87226cd Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 5 Apr 2010 16:32:45 +0200 Subject: [PATCH] network plugin: Be more strict when checking the return value of "setsockopt". --- src/network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network.c b/src/network.c index af4a117c..96053a13 100644 --- a/src/network.c +++ b/src/network.c @@ -1621,7 +1621,7 @@ static int network_set_interface (const sockent_t *se, const struct addrinfo *ai #endif if (setsockopt (se->data.client.fd, IPPROTO_IP, IP_MULTICAST_IF, - &mreq, sizeof (mreq)) == -1) + &mreq, sizeof (mreq)) != 0) { char errbuf[1024]; ERROR ("setsockopt: %s", @@ -1640,7 +1640,7 @@ static int network_set_interface (const sockent_t *se, const struct addrinfo *ai { if (setsockopt (se->data.client.fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, &se->interface, - sizeof (se->interface)) == -1) + sizeof (se->interface)) != 0) { char errbuf[1024]; ERROR ("setsockopt: %s", -- 2.30.2