diff options
| author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-11-22 14:50:11 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2025-11-22 14:50:11 +0100 |
| commit | 80101a458f40cc35f39e890baba1a891a83009e7 (patch) | |
| tree | fe10b6cb9309bef50e7458c5c203905b43529d24 /include/libHX/list.h | |
| parent | f6709441cfabc7240dba76be79200aadcb6c037d (diff) | |
| parent | 2e314136ed58b6860c667e379bef22190fe84aa2 (diff) | |
Update upstream source from tag 'upstream/5.2'
Update to upstream version '5.2'
with Debian dir e7bb6e760b18c46422e9b351ee95d4d043b9cfac
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} |
