[libdazzle] shortcuts: use g_return_if_fail() to warn user



commit 134ec0e9e092b1c5fa590c481be3fb12e8a77bc7
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jun 12 18:45:53 2017 -0700

    shortcuts: use g_return_if_fail() to warn user

 src/shortcuts/dzl-shortcut-chord.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-chord.c b/src/shortcuts/dzl-shortcut-chord.c
index d823167..3a3e0b2 100644
--- a/src/shortcuts/dzl-shortcut-chord.c
+++ b/src/shortcuts/dzl-shortcut-chord.c
@@ -630,9 +630,7 @@ _dzl_shortcut_chord_table_iter_next (DzlShortcutChordTableIter  *iter,
                                      gpointer                   *value)
 {
   g_return_val_if_fail (iter != NULL, FALSE);
-
-  if (iter->table == NULL)
-    return FALSE;
+  g_return_val_if_fail (iter->table != NULL, FALSE);
 
   if (iter->position < iter->table->len)
     {


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