From 73918b4759930c3420b8082342847e92a0cb44c5 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 26 Jul 2013 15:18:43 +0200 Subject: [PATCH] stats plugin: Don't check the value of '(value_t).derive'. statsd_parse_value() will write to (value_t).gauge, so don't read from another member of the union. This also fixes problems with counter values being zero, for whatever that is supposed to be useful for. Github: #358 --- src/statsd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/statsd.c b/src/statsd.c index b697a347..5af34833 100644 --- a/src/statsd.c +++ b/src/statsd.c @@ -218,9 +218,6 @@ static int statsd_handle_counter (char const *name, /* {{{ */ if (status != 0) return (status); - if (value.derive < 1) - return (-1); - return (statsd_metric_add (name, (double) (value.gauge / scale.gauge), STATSD_COUNTER)); } /* }}} int statsd_handle_counter */ -- 2.30.2