MINOR: lists: add LIST_ADDED() to check if an element belongs to a list
authorWilly Tarreau <w@1wt.eu>
Mon, 13 May 2019 15:48:46 +0000 (17:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 13 May 2019 17:14:52 +0000 (19:14 +0200)
commit42ccb5ac45058a4ad8a74794414e76ec371d50c0
treedec456edb0e430ecbc1490d83f53a10787e994af
parent478281f55d46e85650e218893c78ce1d0ede13b3
MINOR: lists: add LIST_ADDED() to check if an element belongs to a list

Some code parts use LIST_ISEMPTY() a lot on list elements to detect
if they were reset consecutive to their removal from a list, but this
test is always confusing as this was initially designed for list heads.

Instead let's have a new macro, LIST_ADDED(), which returns true when
the element is in a list (i.e. it's not "empty").
include/common/mini-clist.h