From 8b18bb8aa97bb95c175cae1230f91311ad9e9153 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Mon, 14 Oct 2024 11:50:42 -0600 Subject: [PATCH] decode: prometheus: initialize timestamp Signed-off-by: Eduardo Silva --- src/cmt_decode_prometheus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmt_decode_prometheus.c b/src/cmt_decode_prometheus.c index 2f0ac7b..ba7ec47 100644 --- a/src/cmt_decode_prometheus.c +++ b/src/cmt_decode_prometheus.c @@ -456,7 +456,7 @@ static int add_metric_histogram(struct cmt_decode_prometheus_context *context) cfl_sds_t *labels_without_le = NULL; cfl_sds_t *values_without_le = NULL; int label_i; - uint64_t timestamp; + uint64_t timestamp = 0; if (cfl_list_size(&context->metric.samples) < 3) { return report_error(context, @@ -682,7 +682,7 @@ static int add_metric_summary(struct cmt_decode_prometheus_context *context) cfl_sds_t *labels_without_quantile = NULL; cfl_sds_t *values_without_quantile = NULL; int label_i; - uint64_t timestamp; + uint64_t timestamp = 0; if (cfl_list_size(&context->metric.samples) < 2) { return report_error(context,