Skip to content

Commit faadf3d

Browse files
authored
tests: runtime: in_podman_metrics: refactor iteration of counters to use cfl_list from #8844. (#8888)
Signed-off-by: Phillip Whelan <[email protected]>
1 parent 0c12e0b commit faadf3d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/runtime/in_podman_metrics.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
#define DPATH_PODMAN_CGROUP_V2 FLB_TESTS_DATA_PATH "/data/podman/cgroupv2"
3131

3232

33-
int check_metric(flb_ctx_t *ctx, flb_sds_t *name) {
33+
int check_metric(flb_ctx_t *ctx, char *name) {
3434
struct mk_list *tmp;
3535
struct mk_list *head;
36-
struct mk_list *inner_tmp;
37-
struct mk_list *inner_head;
36+
struct cfl_list *inner_tmp;
37+
struct cfl_list *inner_head;
3838

3939
struct flb_input_instance *i_ins;
4040
struct cmt_counter *counter;
@@ -43,8 +43,8 @@ int check_metric(flb_ctx_t *ctx, flb_sds_t *name) {
4343

4444
mk_list_foreach_safe(head, tmp, &ctx->config->inputs) {
4545
i_ins = mk_list_entry(head, struct flb_input_instance, _head);
46-
mk_list_foreach_safe(inner_head, inner_tmp, &i_ins->cmt->counters) {
47-
counter = mk_list_entry(inner_head, struct cmt_counter, _head);
46+
cfl_list_foreach_safe(inner_head, inner_tmp, &i_ins->cmt->counters) {
47+
counter = cfl_list_entry(inner_head, struct cmt_counter, _head);
4848

4949
if (strlen(name) != 0 && strcmp(name, counter->opts.name) == 0)
5050
{

0 commit comments

Comments
 (0)