]> git.mdlowis.com Git - proto/labwc.git/commitdiff
don't NULL-check output when it can't be
authorbi4k8 <bi4k8@github>
Thu, 8 Dec 2022 05:28:16 +0000 (05:28 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 8 Dec 2022 19:24:02 +0000 (19:24 +0000)
`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

index 0fb94512b56a40ac4f611e342c66762692ed017b..7764b3b3ca45fb53181ff7a1cbec5b927d8cf40d 100644 (file)
@@ -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);
        }