From f719ea8d69962afd0cfe54ddf65010780044ad30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 13 Aug 2021 04:06:24 +0200 Subject: [PATCH] st/scroll-bar: Remove pointless condition Both branches are identical (which is correct - orientation or text direction is irrelevant for the trough). Spotted by coverity in CID 351261. Part-of: --- src/st/st-scroll-bar.c | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/src/st/st-scroll-bar.c b/src/st/st-scroll-bar.c index d4aa1762d..f7188e824 100644 --- a/src/st/st-scroll-bar.c +++ b/src/st/st-scroll-bar.c @@ -200,23 +200,11 @@ scroll_bar_allocate_children (StScrollBar *bar, st_theme_node_get_content_box (theme_node, box, &content_box); - if (priv->vertical) - { - trough_box.x1 = content_box.x1; - trough_box.y1 = content_box.y1; - trough_box.x2 = content_box.x2; - trough_box.y2 = content_box.y2; - clutter_actor_allocate (priv->trough, &trough_box); - } - else - { - trough_box.x1 = content_box.x1; - trough_box.y1 = content_box.y1; - trough_box.x2 = content_box.x2; - trough_box.y2 = content_box.y2; - clutter_actor_allocate (priv->trough, &trough_box); - } - + trough_box.x1 = content_box.x1; + trough_box.y1 = content_box.y1; + trough_box.x2 = content_box.x2; + trough_box.y2 = content_box.y2; + clutter_actor_allocate (priv->trough, &trough_box); if (priv->adjustment) {