]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Static list initializer
authorMaria Matejka <mq@ucw.cz>
Wed, 2 Mar 2022 10:22:01 +0000 (11:22 +0100)
committerMaria Matejka <mq@ucw.cz>
Wed, 2 Mar 2022 11:13:49 +0000 (12:13 +0100)
lib/lists.h

index 479f4ed1a64d5f95c9f6487c192038eaab7b4c97..7e6d5467011f9eb9c6a160d7e4ac62a923935a59 100644 (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))