diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-11-22 14:50:10 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-11-22 14:50:10 +0100 |
| commit | 2e314136ed58b6860c667e379bef22190fe84aa2 (patch) | |
| tree | 21f897804c03c3419a0c015ace3bf9fb9c1b8e52 /include/libHX/list.h | |
| parent | 50d223b12c1319b4b9c4a5b8e34866c46996cb36 (diff) | |
New upstream version 5.2upstream/5.2upstream
Diffstat (limited to 'include/libHX/list.h')
| -rw-r--r-- | include/libHX/list.h | 8 |
1 files changed, 7 insertions, 1 deletions
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} |
