From 0f9ab9f26f7f164d8663096843c262bd918eb3ff Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 2 Jul 2012 11:55:24 -0400 Subject: [PATCH] src/common.c: rate_to_value: Update last_time and fix type of delta_gauge. --- src/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common.c b/src/common.c index 4ca58d55..9098de59 100644 --- a/src/common.c +++ b/src/common.c @@ -1236,7 +1236,7 @@ int rate_to_value (value_t *ret_value, gauge_t rate, /* {{{ */ rate_to_value_state_t *state, int ds_type, cdtime_t t) { - derive_t delta_gauge; + gauge_t delta_gauge; cdtime_t delta_t; if (ds_type == DS_TYPE_GAUGE) @@ -1322,6 +1322,7 @@ int rate_to_value (value_t *ret_value, gauge_t rate, /* {{{ */ assert (23 == 42); } + state->last_time = t; *ret_value = state->last_value; return (0); } /* }}} value_t rate_to_value */ -- 2.30.2