tupperware: list: add INIT_VAL macro
This commit is contained in:
parent
493487eb2d
commit
5dd1f5b739
|
@ -35,6 +35,12 @@ struct list {
|
||||||
? NULL \
|
? NULL \
|
||||||
: CONTAINER_OF(Type, Field, (Cur)->Field.next)))
|
: CONTAINER_OF(Type, Field, (Cur)->Field.next)))
|
||||||
|
|
||||||
|
#define LIST_NODE_INIT_VAL \
|
||||||
|
((struct list_node){ \
|
||||||
|
.next = NULL, \
|
||||||
|
.prev = NULL, \
|
||||||
|
})
|
||||||
|
|
||||||
typedef int (*list_cmp_f)(const struct list_node *lhs,
|
typedef int (*list_cmp_f)(const struct list_node *lhs,
|
||||||
const struct list_node *rhs, void *cookie);
|
const struct list_node *rhs, void *cookie);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue