From 02b266a0b3e44add0d9282fb57f24719188fefff Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 22 Dec 2023 13:28:07 -0500 Subject: [PATCH] list: fix safe list iteration Signed-off-by: Mathieu Desnoyers --- src/list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/list.h b/src/list.h index 5c1c37a..99070f6 100644 --- a/src/list.h +++ b/src/list.h @@ -69,7 +69,7 @@ void side_list_splice(struct side_list_head *from, struct side_list_head *to) for ((_entry) = side_container_of((_head)->node.next, __typeof__(*(_entry)), _member), \ (_next_entry) = side_container_of((_entry)->_member.next, __typeof__(*(_entry)), _member); \ &(_entry)->_member != &(_head)->node; \ - (_entry) = side_container_of((_next_entry)->_member.next, __typeof__(*(_entry)), _member), \ + (_entry) = (_next_entry), \ (_next_entry) = side_container_of((_entry)->_member.next, __typeof__(*(_entry)), _member)) #endif /* _SIDE_LIST_H */ -- 2.34.1