From 2b1dccd501fedd63842d5555ac334791ad64aec1 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 7 May 2007 00:18:32 +0200 Subject: [PATCH] [MINOR] add LIST_HEAD_INIT to the list management macros It is useful to have the ability to initialize a list while declaring it. --- include/common/mini-clist.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/common/mini-clist.h b/include/common/mini-clist.h index a2a86bde1..caed2dc00 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 :