From 3fca8d4f8277097cda6e26626e3a2911d1cc660a Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Fri, 12 Apr 2024 14:15:29 -0400 Subject: [PATCH] wayland: Fix build warning (boolean always true) --- src/video/wayland/SDL_waylandvideo.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index f531d68ad..7cfb5a25e 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -255,14 +255,12 @@ static void Wayland_SortOutputs(SDL_VideoData *vid) /* Sort the outputs by connector name. */ WAYLAND_wl_list_init(&sorted_list); wl_list_for_each (c, &vid->output_order, link) { - if (c->wl_output_name) { - wl_list_for_each (d, &vid->output_list, link) { - if (d->wl_output_name && SDL_strcmp(c->wl_output_name, d->wl_output_name) == 0) { - /* Remove from the current list and Append the next node to the end of the new list. */ - WAYLAND_wl_list_remove(&d->link); - WAYLAND_wl_list_insert(sorted_list.prev, &d->link); - break; - } + wl_list_for_each (d, &vid->output_list, link) { + if (d->wl_output_name && SDL_strcmp(c->wl_output_name, d->wl_output_name) == 0) { + /* Remove from the current list and Append the next node to the end of the new list. */ + WAYLAND_wl_list_remove(&d->link); + WAYLAND_wl_list_insert(sorted_list.prev, &d->link); + break; } } }