From: bi4k8 Date: Thu, 8 Dec 2022 05:28:16 +0000 (+0000) Subject: don't NULL-check output when it can't be X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=39bea30cd54c8b978b5b0afa666acae9242ad8e7;p=proto%2Flabwc.git 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 --- 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); }