X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fping.c;h=e16ba07706b24a0eddee4c4a13a0d51d30bb6ef4;hb=edd9af8a874ebc9f2a7f02846807229a648917db;hp=da63d3a58c7bb9707b0b0d5763f0ee579b2c4dd5;hpb=0532336600cf2abe1d25af8fbf5ad3cf3b6b31e0;p=collectd.git diff --git a/src/ping.c b/src/ping.c index da63d3a5..e16ba077 100644 --- a/src/ping.c +++ b/src/ping.c @@ -30,7 +30,6 @@ #include "configfile.h" #include "utils_complain.h" -#include #include #if HAVE_NETDB_H # include /* NI_MAXHOST */ @@ -399,7 +398,7 @@ static int start_thread (void) /* {{{ */ pthread_mutex_unlock (&ping_lock); return (-1); } - + pthread_mutex_unlock (&ping_lock); return (0); } /* }}} int start_thread */ @@ -483,7 +482,7 @@ static int ping_config (const char *key, const char *value) /* {{{ */ hostlist_t *hl; char *host; - hl = (hostlist_t *) malloc (sizeof (hostlist_t)); + hl = malloc (sizeof (*hl)); if (hl == NULL) { char errbuf[1024];