X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fthreshold.c;h=94a4f02449c06fb8093defef6ea2a1095e556352;hb=edd9af8a874ebc9f2a7f02846807229a648917db;hp=b753d37445166c4facfdd9facf2cabbf8e4fa1be;hpb=749b03b3fc459895b7415c7c13753066bf0af55b;p=collectd.git diff --git a/src/threshold.c b/src/threshold.c index b753d374..94a4f024 100644 --- a/src/threshold.c +++ b/src/threshold.c @@ -31,7 +31,6 @@ #include "utils_threshold.h" #include -#include /* * Threshold management @@ -70,7 +69,7 @@ static int ut_threshold_add (const threshold_t *th) return (-1); } - th_copy = (threshold_t *) malloc (sizeof (threshold_t)); + th_copy = malloc (sizeof (*th_copy)); if (th_copy == NULL) { sfree (name_copy); @@ -78,7 +77,6 @@ static int ut_threshold_add (const threshold_t *th) return (-1); } memcpy (th_copy, th, sizeof (threshold_t)); - th_ptr = NULL; DEBUG ("ut_threshold_add: Adding entry `%s'", name); @@ -868,7 +866,7 @@ static int ut_missing (const value_list_t *vl, return (0); } /* }}} int ut_missing */ -int ut_config (oconfig_item_t *ci) +static int ut_config (oconfig_item_t *ci) { /* {{{ */ int i; int status = 0;