[vlc-commits] list: add static initializer macro

Rémi Denis-Courmont git at videolan.org
Sun Jun 17 20:13:12 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 17 20:29:39 2018 +0300| [6092e60737a3725f5a208a7a72ea4a39974f4d01] | committer: Rémi Denis-Courmont

list: add static initializer macro

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6092e60737a3725f5a208a7a72ea4a39974f4d01
---

 include/vlc_list.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/vlc_list.h b/include/vlc_list.h
index 4eba954a92..45263cc789 100644
--- a/include/vlc_list.h
+++ b/include/vlc_list.h
@@ -46,6 +46,11 @@ struct vlc_list
 };
 
 /**
+ * Static initializer for a list head.
+ */
+#define VLC_LIST_INITIALIZER(h) { h, h }
+
+/**
  * Initializes an empty list head.
  */
 static inline void vlc_list_init(struct vlc_list *restrict head)



More information about the vlc-commits mailing list