[glib] Fix g_return_if_fail vs. return_val_if_fail



commit cdff4a331ef5ba986afb3707db6cc019b71654d4
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Jul 13 15:48:39 2013 -0400

    Fix g_return_if_fail vs. return_val_if_fail

 gio/gaction.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gaction.c b/gio/gaction.c
index 3c6a0e5..77cbe70 100644
--- a/gio/gaction.c
+++ b/gio/gaction.c
@@ -416,7 +416,7 @@ g_action_name_is_valid (const gchar *action_name)
   gchar c;
   gint i;
 
-  g_return_if_fail (action_name != NULL);
+  g_return_val_if_fail (action_name != NULL, FALSE);
 
   for (i = 0; (c = action_name[i]); i++)
     if (!g_ascii_isalnum (c) && c != '.' && c != '-')
@@ -557,7 +557,7 @@ gchar *
 g_action_print_detailed_name (const gchar *action_name,
                               GVariant    *target_value)
 {
-  g_return_if_fail (g_action_name_is_valid (action_name));
+  g_return_val_if_fail (g_action_name_is_valid (action_name), NULL);
 
   if (target_value == NULL)
     return g_strdup (action_name);


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