X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fthreshold.c;h=624ab7a91dd7c14b7112e9c2884bff46c636f8d1;hb=d13a04dc3645a21acecc14a4174837766ecb6a2b;hp=a5e50a22ffe5e9209049331155e6dc3f467014e9;hpb=9b7dee8838f56233cea2854a7ddbcad2790609ce;p=collectd.git diff --git a/src/threshold.c b/src/threshold.c index a5e50a22..624ab7a9 100644 --- a/src/threshold.c +++ b/src/threshold.c @@ -70,7 +70,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); @@ -553,7 +553,7 @@ static int ut_report_state (const data_set_t *ds, { gauge_t value; gauge_t sum; - int i; + size_t i; sum = 0.0; for (i = 0; i < vl->values_len; i++) @@ -701,7 +701,7 @@ static int ut_check_one_threshold (const data_set_t *ds, { /* {{{ */ int ret = -1; int ds_index = -1; - int i; + size_t i; gauge_t values_copy[ds->ds_num]; memcpy (values_copy, values, sizeof (values_copy)); @@ -868,7 +868,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;