safe_list: add safe_list_empty()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
ee3e7a6f9f
commit
dcf93f3322
1 changed files with 5 additions and 0 deletions
|
@ -53,4 +53,9 @@ void safe_list_del(struct safe_list *list);
|
|||
#define SAFE_LIST_INIT(_name) { LIST_HEAD_INIT(_name.list), NULL }
|
||||
#define SAFE_LIST(_name) struct safe_list _name = SAFE_LIST_INIT(_name)
|
||||
|
||||
static inline bool safe_list_empty(struct safe_list *head)
|
||||
{
|
||||
return list_empty(&head->list);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue