Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-04-15 17:53:57 +0400
committerFelix Fietkau <nbd@openwrt.org>2013-04-15 17:53:57 +0400
commitdcf93f332270bdaddb5d24fdba6e3eb5b1f7d80a (patch)
tree1049814c291ddec37485a848486eaf403d65390d /safe_list.h
parentee3e7a6f9f617698c4b2c8bdfd79179076fed1b9 (diff)
safe_list: add safe_list_empty()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'safe_list.h')
-rw-r--r--safe_list.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/safe_list.h b/safe_list.h
index 248f97a..3c8b61b 100644
--- a/safe_list.h
+++ b/safe_list.h
@@ -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