diff --git a/include/common/mini-clist.h b/include/common/mini-clist.h index 648cbd5dc..592bb9613 100644 --- a/include/common/mini-clist.h +++ b/include/common/mini-clist.h @@ -111,6 +111,11 @@ struct cond_wordlist { /* checks if the list head is empty or not */ #define LIST_ISEMPTY(lh) ((lh)->n == (lh)) +/* checks if the list element was added to a list or not. This only + * works when detached elements are reinitialized (using LIST_DEL_INIT) + */ +#define LIST_ADDED(el) ((el)->n != (el)) + /* returns a pointer of type to a structure following the element * which contains list head , which is known as element in * struct pt.