X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fwrite_riemann_threshold.c;h=85672882a096ef5b14ba6876b05df32ed620b3d1;hb=d54f3b1640ee23b5213ac870ca3de558f54e8247;hp=b1f7297eec9b06e90d03df594599b87e5418b979;hpb=e790264a655713a5f9b0b733e2ed56c16bff63f4;p=collectd.git diff --git a/src/write_riemann_threshold.c b/src/write_riemann_threshold.c index b1f7297e..85672882 100644 --- a/src/write_riemann_threshold.c +++ b/src/write_riemann_threshold.c @@ -134,7 +134,7 @@ static int ut_check_one_threshold (const data_set_t *ds, int *statuses) { /* {{{ */ int ret = -1; - int i; + size_t i; int status; gauge_t values_copy[ds->ds_num]; @@ -203,7 +203,9 @@ int write_riemann_threshold_check (const data_set_t *ds, const value_list_t *vl, gauge_t *values; int status; + assert (vl->values_len > 0); memset(statuses, 0, vl->values_len * sizeof(*statuses)); + if (threshold_tree == NULL) return 0;