From: Willy Tarreau Date: Sun, 6 May 2007 22:18:32 +0000 (+0200) Subject: [MINOR] add LIST_HEAD_INIT to the list management macros X-Git-Tag: v1.3.10~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b1dccd501fedd63842d5555ac334791ad64aec1;p=thirdparty%2Fhaproxy.git [MINOR] add LIST_HEAD_INIT to the list management macros It is useful to have the ability to initialize a list while declaring it. --- diff --git a/include/common/mini-clist.h b/include/common/mini-clist.h index a2a86bde11..caed2dc00c 100644 --- a/include/common/mini-clist.h +++ b/include/common/mini-clist.h @@ -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 :