X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fnetwork.c;h=0ee6ed0b9834f96a9ad1cd885657c0e5f9719c89;hb=43a771aa5443266cca4cb7aecaf70eb75100a32c;hp=04dffe8b3251804a2500356edd1ee0e183d9be02;hpb=7f6c4a16fdacab6c11f8a7756f0d8438ce198288;p=collectd.git diff --git a/src/network.c b/src/network.c index 04dffe8b..0ee6ed0b 100644 --- a/src/network.c +++ b/src/network.c @@ -22,6 +22,7 @@ * Aman Gupta **/ +#define _DEFAULT_SOURCE #define _BSD_SOURCE /* For struct ip_mreq */ #include "collectd.h" @@ -2415,7 +2416,7 @@ static int network_receive (void) /* {{{ */ int buffer_len; int i; - int status; + int status = 0; receive_list_entry_t *private_list_head; receive_list_entry_t *private_list_tail; @@ -2538,10 +2539,6 @@ static int network_receive (void) /* {{{ */ receive_list_tail = private_list_tail; receive_list_length += private_list_length; - private_list_head = NULL; - private_list_tail = NULL; - private_list_length = 0; - pthread_cond_signal (&receive_list_cond); pthread_mutex_unlock (&receive_list_lock); } @@ -2989,7 +2986,7 @@ static int network_config_set_ttl (const oconfig_item_t *ci) /* {{{ */ network_config_ttl = tmp; else { WARNING ("network plugin: The `TimeToLive' must be between 1 and 255."); - return (-1); + return (-1); } return (0);