]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - list.h
list.h: Convert INIT_LIST_HEAD macro to inline function.
[paraslash.git] / list.h
diff --git a/list.h b/list.h
index ddcb69da1e00c4f9b82fc5b35d190b932a0e0709..78c302fa322fe6bc2dae2926e95e58189c10c944 100644 (file)
--- 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.