From 1e8e08ce61187590cbf67a1b4c72fabd6806ac8f Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 21 Nov 2019 17:02:37 -0600 Subject: [PATCH] Simplify if statement And make the end of st_theme_node_lookup_length() consistent with st_theme_node_lookup_color() and st_theme_node_lookup_shadow(). Part of https://gitlab.gnome.org/GNOME/gnome-shell/issues/1934 --- src/st/st-theme-node.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c index 0f5bb3283..5dc7bc5b6 100644 --- a/src/st/st-theme-node.c +++ b/src/st/st-theme-node.c @@ -1193,11 +1193,10 @@ st_theme_node_lookup_length (StThemeNode *node, else if (result == VALUE_INHERIT) inherit = TRUE; - if (inherit && node->parent_node && - st_theme_node_lookup_length (node->parent_node, property_name, inherit, length)) - return TRUE; - else - return FALSE; + if (inherit && node->parent_node) + return st_theme_node_lookup_length (node->parent_node, property_name, inherit, length); + + return FALSE; } /**