diff options
author | Sughosh Ganu <sughosh.ganu@linaro.org> | 2024-08-28 22:24:22 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-08-30 13:51:38 -0600 |
commit | be222ac029c31b38ffdfdc135ced8b5a40b8216b (patch) | |
tree | 3546c8860d46694952674e88766c6e0eccbe71ad /test | |
parent | e83ced1a24095de66e526bd6c10f0f24584baaee (diff) |
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 <sughosh.ganu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/boot/expo.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); |