[PATCH] Fix potentially undefined behavior

Joel Teichroeb joel at teichroeb.net
Tue Nov 23 16:17:13 PST 2010


This patch is also needed.
---
 wayland/wayland-util.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/wayland/wayland-util.h b/wayland/wayland-util.h
index dcda75b..2675c7a 100644
--- a/wayland/wayland-util.h
+++ b/wayland/wayland-util.h
@@ -101,6 +101,7 @@ int wl_list_empty(struct wl_list *list);

 #define wl_list_for_each_safe(pos, tmp, head, member)            \
     pos = 0;                            \
+    tmp = 0;                            \
     for (pos = __container_of((head)->next, pos, member),        \
          tmp = __container_of((pos)->member.next, tmp, member);    \
          &pos->member != (head);                    \
-- 
1.7.3.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20101123/c180c14b/attachment.html>


More information about the wayland-devel mailing list