X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fping.c;h=0a9bc444fa15f1ec857d93790f50299ba4b4b150;hb=4103105fb43cd72294f165b2541540b3a8a99532;hp=da63d3a58c7bb9707b0b0d5763f0ee579b2c4dd5;hpb=28fa063b625c772f45c99b618f498715fb98474b;p=collectd.git diff --git a/src/ping.c b/src/ping.c index da63d3a5..0a9bc444 100644 --- a/src/ping.c +++ b/src/ping.c @@ -25,12 +25,12 @@ **/ #include "collectd.h" + #include "common.h" #include "plugin.h" #include "configfile.h" #include "utils_complain.h" -#include #include #if HAVE_NETDB_H # include /* NI_MAXHOST */ @@ -399,7 +399,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 +483,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];