From be222ac029c31b38ffdfdc135ced8b5a40b8216b Mon Sep 17 00:00:00 2001 From: Sughosh Ganu Date: Wed, 28 Aug 2024 22:24:22 +0530 Subject: list: use list_count_nodes() to count list entries Use the API function list_count_nodes() to count the number of list entries. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- test/boot/expo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test') diff --git a/test/boot/expo.c b/test/boot/expo.c index 4b24f504e21..9b4aa803eb1 100644 --- a/test/boot/expo.c +++ b/test/boot/expo.c @@ -702,9 +702,7 @@ static int expo_test_build(struct unit_test_state *uts) txt = scene_obj_find(scn, item->label_id, SCENEOBJT_NONE); ut_asserteq_str("2 GHz", expo_get_str(exp, txt->str_id)); - count = 0; - list_for_each_entry(item, &menu->item_head, sibling) - count++; + count = list_count_nodes(&menu->item_head); ut_asserteq(3, count); expo_destroy(exp); -- cgit v1.2.3