[libdazzle] shortcuts: remove dead ternary



commit 8a9d18e6c8f2834e715e1144df3dd56e914b3ebf
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jul 10 16:24:16 2017 -0700

    shortcuts: remove dead ternary
    
    We are always non-NULL when we reach this location.

 src/shortcuts/dzl-shortcut-theme-editor.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-theme-editor.c b/src/shortcuts/dzl-shortcut-theme-editor.c
index bb6e099..0fe29e6 100644
--- a/src/shortcuts/dzl-shortcut-theme-editor.c
+++ b/src/shortcuts/dzl-shortcut-theme-editor.c
@@ -24,6 +24,7 @@
 #include "shortcuts/dzl-shortcut-model.h"
 #include "shortcuts/dzl-shortcut-private.h"
 #include "shortcuts/dzl-shortcut-theme-editor.h"
+#include "util/dzl-util-private.h"
 
 typedef struct
 {
@@ -138,7 +139,7 @@ dzl_shortcut_theme_editor_filter_changed (DzlShortcutThemeEditor *self,
   filter = gtk_tree_model_filter_new (priv->model, NULL);
   text = gtk_entry_get_text (GTK_ENTRY (entry));
 
-  if (!text || !*text)
+  if (dzl_str_empty0 (text))
     {
       gtk_tree_view_set_model (priv->tree_view, priv->model);
       gtk_tree_view_expand_all (priv->tree_view);
@@ -147,7 +148,7 @@ dzl_shortcut_theme_editor_filter_changed (DzlShortcutThemeEditor *self,
 
   gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (filter),
                                           dzl_shortcut_theme_editor_visible_func,
-                                          text ? g_utf8_casefold (text, -1) : NULL,
+                                          g_utf8_casefold (text, -1),
                                           g_free);
   gtk_tree_view_set_model (priv->tree_view, GTK_TREE_MODEL (filter));
   gtk_tree_view_expand_all (priv->tree_view);


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