[glib] return_if_fail vs. return_val_if_fail fix



commit 3f3d2976d1102eb202e58e42793a511d01d10604
Author: Ryan Lortie <desrt desrt ca>
Date:   Tue Feb 4 14:22:55 2014 +0000

    return_if_fail vs. return_val_if_fail fix

 glib/gvariant.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/gvariant.c b/glib/gvariant.c
index b8a1c4a..e5f23c4 100644
--- a/glib/gvariant.c
+++ b/glib/gvariant.c
@@ -4074,7 +4074,7 @@ g_variant_dict_end (GVariantDict *dict)
   GHashTableIter iter;
   gpointer key, value;
 
-  g_return_if_fail (is_valid_dict (dict));
+  g_return_val_if_fail (is_valid_dict (dict), NULL);
 
   g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT);
 
@@ -4103,7 +4103,7 @@ g_variant_dict_end (GVariantDict *dict)
 GVariantDict *
 g_variant_dict_ref (GVariantDict *dict)
 {
-  g_return_if_fail (is_valid_heap_dict (dict));
+  g_return_val_if_fail (is_valid_heap_dict (dict), NULL);
 
   GVHD(dict)->ref_count++;
 


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