[MINOR] add LIST_HEAD_INIT to the list management macros
It is useful to have the ability to initialize a list while declaring it.
This commit is contained in:
parent
b9c62b90da
commit
2b1dccd501
|
@ -23,6 +23,8 @@ struct list {
|
|||
|
||||
#define LIST_INIT(l) ((l)->n = (l)->p = (l))
|
||||
|
||||
#define LIST_HEAD_INIT(l) { &l, &l }
|
||||
|
||||
/* dual linked lists :
|
||||
* Start = (struct list *) pointer to the next elem's prev list entry
|
||||
* For each element :
|
||||
|
|
Loading…
Reference in New Issue