[gtk+] Don't return G_TYPE_INVALID as a pointer



commit 70f6faf0f1d1011f75cde28796ff5a3405cc5a78
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Mar 22 15:19:59 2015 -0400

    Don't return G_TYPE_INVALID as a pointer
    
    Use NULL for g_return_val_if_fail checks if the function returns
    a pointer. Pointed out by clang.

 gtk/gtkwidgetpath.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidgetpath.c b/gtk/gtkwidgetpath.c
index 7d10199..8f3ae06 100644
--- a/gtk/gtkwidgetpath.c
+++ b/gtk/gtkwidgetpath.c
@@ -497,8 +497,8 @@ gtk_widget_path_iter_get_siblings (const GtkWidgetPath *path,
 {
   GtkPathElement *elem;
 
-  g_return_val_if_fail (path != NULL, G_TYPE_INVALID);
-  g_return_val_if_fail (path->elems->len != 0, G_TYPE_INVALID);
+  g_return_val_if_fail (path != NULL, NULL);
+  g_return_val_if_fail (path->elems->len != 0, NULL);
 
   if (pos < 0 || pos >= path->elems->len)
     pos = path->elems->len - 1;


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