From 6604da3cf02389d364706d58565dbfb3e94a6d35 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 28 Oct 2011 23:03:13 +0300 Subject: [PATCH] dl_list: Add DEFINE_DL_LIST This allows statically defining an empty initialised list. --- src/utils/list.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/list.h b/src/utils/list.h index ded78464a..c8dccee83 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 */