From: Maria Matejka Date: Wed, 2 Mar 2022 10:22:01 +0000 (+0100) Subject: Static list initializer X-Git-Tag: v2.0.11~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e8b8bfcc46ec1493f9e0efe9c796b88df85ada4;p=thirdparty%2Fbird.git Static list initializer --- diff --git a/lib/lists.h b/lib/lists.h index 479f4ed1a..7e6d54670 100644 --- a/lib/lists.h +++ b/lib/lists.h @@ -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))