X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=list.h;h=78c302fa322fe6bc2dae2926e95e58189c10c944;hp=ddcb69da1e00c4f9b82fc5b35d190b932a0e0709;hb=442a3320ff155d09b990c0ee2abace399cbcd6dd;hpb=c0e4799bafc72ffdb7e8912317b8f74acbbc2736;ds=sidebyside diff --git a/list.h b/list.h index ddcb69da..78c302fa 100644 --- a/list.h +++ b/list.h @@ -25,9 +25,11 @@ struct list_head { #define INITIALIZED_LIST_HEAD(name) struct list_head name = {&(name), &(name)} /** This must be called before using any other list functions. */ -#define INIT_LIST_HEAD(ptr) do { \ - (ptr)->next = (ptr); (ptr)->prev = (ptr); \ -} while (0) +static inline void init_list_head(struct list_head *head) +{ + head->next = head; + head->prev = head; +} /** * Insert a new entry after the specified head.