From 2e314136ed58b6860c667e379bef22190fe84aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 22 Nov 2025 14:50:10 +0100 Subject: New upstream version 5.2 --- include/libHX/list.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/libHX/list.h') diff --git a/include/libHX/list.h b/include/libHX/list.h index f226bec..fc43e20 100644 --- a/include/libHX/list.h +++ b/include/libHX/list.h @@ -55,6 +55,12 @@ static __inline__ void HXlist_del(struct HXlist_head *entry) entry->next->prev = entry->prev; entry->next = NULL; entry->prev = NULL; + /* + * The node is now not connected to any (true) list head, so setting + * ``entry->next = entry;`` does not make much sense. You can call + * HXlist_init if needed, and the compiler will optimize the extraneous + * assignemtns from HXlist_del away. + */ } static __inline__ bool HXlist_empty(const struct HXlist_head *head) @@ -104,7 +110,7 @@ struct HXclist_head { struct HXlist_head *next, *prev; }; }; - unsigned int items; + size_t items; }; #define HXCLIST_HEAD_INIT(name) {{{&(name).list, &(name).list}}, 0} -- cgit v1.2.3