From 39bea30cd54c8b978b5b0afa666acae9242ad8e7 Mon Sep 17 00:00:00 2001 From: bi4k8 Date: Thu, 8 Dec 2022 05:28:16 +0000 Subject: [PATCH] don't NULL-check output when it can't be `output` here is the `pos` argument of `wl_list_for_each`, which means it is always assigned a return value of `wl_container_of`; this in turn means that it is never NULL. checking against NULL here just confuses static analysis and readers --- src/output.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/output.c b/src/output.c index 0fb94512..7764b3b3 100644 --- a/src/output.c +++ b/src/output.c @@ -392,9 +392,7 @@ do_output_layout_change(struct server *server) struct output *output; wl_list_for_each(output, &server->outputs, link) { - if (output) { - layers_arrange(output); - } + layers_arrange(output); } output_update_for_layout_change(server); } -- 2.52.0