From 4573fe6ca47e2dc51384455a165ede6209ac4033 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 2 Feb 2024 08:42:17 +0100 Subject: [PATCH] format_stackdriver: Remove `int` cast from `yajl_gen_double()`. --- src/utils/format_stackdriver/format_stackdriver.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/utils/format_stackdriver/format_stackdriver.c b/src/utils/format_stackdriver/format_stackdriver.c index 2976a66f4..5c027e010 100644 --- a/src/utils/format_stackdriver/format_stackdriver.c +++ b/src/utils/format_stackdriver/format_stackdriver.c @@ -134,8 +134,8 @@ static int format_typed_value(yajl_gen gen, metric_t const *m, switch (m->family->type) { case METRIC_TYPE_GAUGE: { - int status = json_string(gen, "doubleValue") || - (int)yajl_gen_double(gen, m->value.gauge); + int status = + json_string(gen, "doubleValue") || yajl_gen_double(gen, m->value.gauge); if (status != 0) { return status; } @@ -146,8 +146,7 @@ static int format_typed_value(yajl_gen gen, metric_t const *m, assert(m->value.fpcounter >= start_value.fpcounter); fpcounter_t diff = m->value.fpcounter - start_value.fpcounter; - int status = - json_string(gen, "doubleValue") || (int)yajl_gen_double(gen, diff); + int status = json_string(gen, "doubleValue") || yajl_gen_double(gen, diff); if (status != 0) { return status; } -- 2.47.2