summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 005a70a)
raw | patch | inline | side by side (parent: 005a70a)
author | Florian Forster <octo@collectd.org> | |
Thu, 28 Jul 2016 10:03:43 +0000 (12:03 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 28 Jul 2016 10:03:43 +0000 (12:03 +0200) |
Fixes: #1813
src/match_empty_counter.c | patch | blob | history |
index eba6a58ea272445b98987dc3ca0c6d3cbc3beece..caa3e7e302c000c342775e64665f5aa46ac3c6b0 100644 (file)
for (i = 0; i < ds->ds_num; i++)
{
- if (ds->ds[i].type != DS_TYPE_COUNTER)
+ if ((ds->ds[i].type != DS_TYPE_DERIVE)
+ && (ds->ds[i].type != DS_TYPE_COUNTER))
continue;
num_counters++;
- if (vl->values[i].counter == 0)
+ if (((ds->ds[i].type == DS_TYPE_DERIVE) && (vl->values[i].derive == 0))
+ || ((ds->ds[i].type == DS_TYPE_COUNTER) && (vl->values[i].counter == 0)))
num_empty++;
}