projects
/
platform
/
upstream
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd8891b
)
wayland-util: wl_list_insert_list() should accept empty lists
author
Jonas Ådahl
<jadahl@gmail.com>
Tue, 12 Jun 2012 21:57:32 +0000
(23:57 +0200)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Wed, 13 Jun 2012 00:18:38 +0000
(20:18 -0400)
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
src/wayland-util.c
patch
|
blob
|
history
diff --git
a/src/wayland-util.c
b/src/wayland-util.c
index
eac7801
..
107b6db
100644
(file)
--- a/
src/wayland-util.c
+++ b/
src/wayland-util.c
@@
-79,6
+79,9
@@
wl_list_empty(struct wl_list *list)
WL_EXPORT void
wl_list_insert_list(struct wl_list *list, struct wl_list *other)
{
+ if (wl_list_empty(other))
+ return;
+
other->next->prev = list;
other->prev->next = list->next;
list->next->prev = other->prev;