projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee3e7a6
)
safe_list: add safe_list_empty()
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 15 Apr 2013 13:53:57 +0000
(15:53 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 15 Apr 2013 13:53:57 +0000
(15:53 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
safe_list.h
patch
|
blob
|
history
diff --git
a/safe_list.h
b/safe_list.h
index 248f97ae8b5d40a70adbccd3df980e6bd5148eab..3c8b61ba6c80c3f9c28ff01bc11906bcd023723d 100644
(file)
--- 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