projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbe559f
)
network plugin: Be more strict when checking the return value of "setsockopt".
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Mon, 5 Apr 2010 14:32:45 +0000
(16:32 +0200)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Mon, 5 Apr 2010 14:32:45 +0000
(16:32 +0200)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index
af4a117
..
96053a1
100644
(file)
--- 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",