<br>---<br> wayland/wayland-util.h | 3 +++<br> 1 files changed, 3 insertions(+), 0 deletions(-)<br><br>diff --git a/wayland/wayland-util.h b/wayland/wayland-util.h<br>index 575e657..dcda75b 100644<br>--- a/wayland/wayland-util.h<br>
+++ b/wayland/wayland-util.h<br>@@ -94,11 +94,13 @@ int wl_list_empty(struct wl_list *list);<br> ((char *)&(sample)->member - (char *)(sample)))<br> <br> #define wl_list_for_each(pos, head, member) \<br>
+ pos = 0; \<br> for (pos = __container_of((head)->next, pos, member); \<br> &pos->member != (head); \<br> pos = __container_of(pos->member.next, pos, member))<br>
<br> #define wl_list_for_each_safe(pos, tmp, head, member) \<br>+ pos = 0; \<br> for (pos = __container_of((head)->next, pos, member), \<br> tmp = __container_of((pos)->member.next, tmp, member); \<br>
&pos->member != (head); \<br>@@ -106,6 +108,7 @@ int wl_list_empty(struct wl_list *list);<br> tmp = __container_of(pos->member.next, tmp, member))<br> <br> #define wl_list_for_each_reverse(pos, head, member) \<br>
+ pos = 0; \<br> for (pos = __container_of((head)->prev, pos, member); \<br> &pos->member != (head); \<br> pos = __container_of(pos->member.prev, pos, member))<br>
-- <br>1.7.3.2<br><br>