From: David Gibson Date: Wed, 10 Aug 2016 10:07:14 +0000 (+1000) Subject: Fix conceptual buglet in default_callback X-Git-Tag: collectd-5.6.0~3^2~6 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=a7b0cdea4f6a0f8d29ade21ae058182f720dd432;p=collectd.git Fix conceptual buglet in default_callback The 'DERIVE' path in default_callback() increments the 'counter' field of value instead of the 'derive' field. Since those fields have the same type and offset within the value union this will still work fine, but AFAICT it's conceptually incorrect. This corrects it. Signed-off-by: David Gibson Signed-off-by: Florian Forster --- diff --git a/src/daemon/utils_match.c b/src/daemon/utils_match.c index 5083b05a..38472848 100644 --- a/src/daemon/utils_match.c +++ b/src/daemon/utils_match.c @@ -169,7 +169,7 @@ static int default_callback (const char __attribute__((unused)) *str, if (data->ds_type & UTILS_MATCH_CF_DERIVE_INC) { - data->value.counter++; + data->value.derive++; data->values_num++; return (0); }