This allows statically defining an empty initialised list. --- src/utils/list.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/utils/list.h b/src/utils/list.h index ded7846..c8dccee 100644 --- a/src/utils/list.h +++ b/src/utils/list.h @@ -95,4 +95,7 @@ static inline unsigned int dl_list_len(struct dl_list *list) &item->member != (list); \ item = dl_list_entry(item->member.prev, type, member)) +#define DEFINE_DL_LIST(name) \ + struct dl_list name = { &(name), &(name) } + #endif /* LIST_H */ -- 1.7.6.3