0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 01:31:55 +00:00

Static list initializer

This commit is contained in:
Maria Matejka 2022-03-02 11:22:01 +01:00
parent d071aca7aa
commit 2e8b8bfcc4

View File

@ -42,6 +42,7 @@ typedef union list { /* In fact two overlayed nodes */
};
} list;
#define STATIC_LIST_INIT(name) name = { .head = &name.tail_node, .tail = &name.head_node, .null = NULL }
#define NODE (node *)
#define HEAD(list) ((void *)((list).head))