Skip to content

Commit

Permalink
decode: prometheus: initialize timestamp
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Oct 14, 2024
1 parent 2c90a10 commit 8b18bb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmt_decode_prometheus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8b18bb8

Please sign in to comment.