wayland-util: wl_list_insert_list() should accept empty lists

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
Jonas Ådahl 2012-06-12 23:57:32 +02:00 committed by Kristian Høgsberg
parent dd8891be36
commit f36f32a0e0

View file

@ -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;