From ac48547feef17423945a13e154a17b23044cbd45 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 15 Jul 2017 21:32:07 +0200 Subject: [PATCH] Fix issue for last_p which doesn't detect an end of iteration as valid. --- m-i-list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m-i-list.h b/m-i-list.h index 9a161b91..7b1966ae 100644 --- a/m-i-list.h +++ b/m-i-list.h @@ -257,7 +257,7 @@ typedef struct ilist_head_s { M_C3(ilist_, name, _last_p)(const list_it_t it) \ { \ assert (it != NULL); \ - return it->next == it->head; \ + return it->next == it->head || it->current == it->head; \ } \ \ static inline void \