From 94a39087bca0e13a3824475b83cd8f184dcd40e7 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sat, 2 Sep 2023 09:57:56 -0300 Subject: [PATCH] eis-client: Always set has_position variable If meta_eis_viewport_get_position() returned FALSE, the variable 'has_position' would be initialized. This variable represents exactly the return value of meta_eis_viewport_get_position(), so just assign it to the variable directly. Spotted by Coverity. Part-of: --- src/backends/meta-eis-client.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backends/meta-eis-client.c b/src/backends/meta-eis-client.c index f7e4e8fe2..86534fe5b 100644 --- a/src/backends/meta-eis-client.c +++ b/src/backends/meta-eis-client.c @@ -257,8 +257,7 @@ add_viewport_region (struct eis_device *eis_device, const char *mapping_id; struct eis_region *eis_region; - if (meta_eis_viewport_get_position (viewport, &x, &y)) - has_position = TRUE; + has_position = meta_eis_viewport_get_position (viewport, &x, &y); meta_eis_viewport_get_size (viewport, &width, &height); scale = meta_eis_viewport_get_physical_scale (viewport);