projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c375519
)
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:34:55 +0000
(16:34 +0200)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index
ac69254
..
a530505
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-1529,7
+1529,7
@@
static int network_set_ttl (const sockent_t *se, const struct addrinfo *ai)
if (setsockopt (se->data.client.fd, IPPROTO_IP, optname,
&network_config_ttl,
- sizeof (network_config_ttl))
== -1
)
+ sizeof (network_config_ttl))
!= 0
)
{
char errbuf[1024];
ERROR ("setsockopt: %s",
@@
-1550,7
+1550,7
@@
static int network_set_ttl (const sockent_t *se, const struct addrinfo *ai)
if (setsockopt (se->data.client.fd, IPPROTO_IPV6, optname,
&network_config_ttl,
- sizeof (network_config_ttl))
== -1
)
+ sizeof (network_config_ttl))
!= 0
)
{
char errbuf[1024];
ERROR ("setsockopt: %s",