From 76f64aabaaf552edd746bda42bcaf45dafd77e22 Mon Sep 17 00:00:00 2001 From: Phillip Whelan Date: Tue, 28 May 2024 19:19:53 -0400 Subject: [PATCH] tests/runtime/in_podman_metrics: refactor iteration of counters to use cfl_list from #8844. Signed-off-by: Phillip Whelan --- tests/runtime/in_podman_metrics.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/runtime/in_podman_metrics.c b/tests/runtime/in_podman_metrics.c index 5ea0f852b7c..929fb2e2dac 100644 --- a/tests/runtime/in_podman_metrics.c +++ b/tests/runtime/in_podman_metrics.c @@ -30,11 +30,11 @@ #define DPATH_PODMAN_CGROUP_V2 FLB_TESTS_DATA_PATH "/data/podman/cgroupv2" -int check_metric(flb_ctx_t *ctx, flb_sds_t *name) { +int check_metric(flb_ctx_t *ctx, char *name) { struct mk_list *tmp; struct mk_list *head; - struct mk_list *inner_tmp; - struct mk_list *inner_head; + struct cfl_list *inner_tmp; + struct cfl_list *inner_head; struct flb_input_instance *i_ins; struct cmt_counter *counter; @@ -43,8 +43,8 @@ int check_metric(flb_ctx_t *ctx, flb_sds_t *name) { mk_list_foreach_safe(head, tmp, &ctx->config->inputs) { i_ins = mk_list_entry(head, struct flb_input_instance, _head); - mk_list_foreach_safe(inner_head, inner_tmp, &i_ins->cmt->counters) { - counter = mk_list_entry(inner_head, struct cmt_counter, _head); + cfl_list_foreach_safe(inner_head, inner_tmp, &i_ins->cmt->counters) { + counter = cfl_list_entry(inner_head, struct cmt_counter, _head); if (strlen(name) != 0 && strcmp(name, counter->opts.name) == 0) {