[gnome-shell] Simplify if statement



commit 1e8e08ce61187590cbf67a1b4c72fabd6806ac8f
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Nov 21 17:02:37 2019 -0600

    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 0f5bb32839..5dc7bc5b69 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;
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]