diff options
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r-- | src/apk_defines.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h index 3c72c73..2ef0c3b 100644 --- a/src/apk_defines.h +++ b/src/apk_defines.h @@ -257,6 +257,11 @@ static inline int list_hashed(const struct list_head *n) return n->next != n && n->next != NULL; } +static inline int list_empty(const struct list_head *n) +{ + return n->next == n; +} + #define list_entry(ptr, type, member) container_of(ptr,type,member) #define list_for_each(pos, head) \ |