mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-01 22:58:40 -04:00
wayland-util: wl_list_insert_list() should accept empty lists
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
parent
dd8891be36
commit
f36f32a0e0
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue