[gtk+] Fix a few dubious return values in return_if_fail calls



commit 1dcd209cddcbc81e9cd6c13a16b8e06aa1272964
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Sep 19 01:58:46 2010 -0400

    Fix a few dubious return values in return_if_fail calls
    
    These were pointed out in bug 623958.

 gtk/gtkiconview.c  |   12 ++++++------
 gtk/gtkmenushell.c |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 522c517..b491a14 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -5995,9 +5995,9 @@ gtk_icon_view_get_item_row (GtkIconView *icon_view,
 {
   GtkIconViewItem *item;
 
-  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), FALSE);
-  g_return_val_if_fail (icon_view->priv->model != NULL, FALSE);
-  g_return_val_if_fail (path != NULL, FALSE);
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
+  g_return_val_if_fail (icon_view->priv->model != NULL, -1);
+  g_return_val_if_fail (path != NULL, -1);
 
   item = g_list_nth_data (icon_view->priv->items,
                           gtk_tree_path_get_indices(path)[0]);
@@ -6026,9 +6026,9 @@ gtk_icon_view_get_item_column (GtkIconView *icon_view,
 {
   GtkIconViewItem *item;
 
-  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), FALSE);
-  g_return_val_if_fail (icon_view->priv->model != NULL, FALSE);
-  g_return_val_if_fail (path != NULL, FALSE);
+  g_return_val_if_fail (GTK_IS_ICON_VIEW (icon_view), -1);
+  g_return_val_if_fail (icon_view->priv->model != NULL, -1);
+  g_return_val_if_fail (path != NULL, -1);
 
   item = g_list_nth_data (icon_view->priv->items,
                           gtk_tree_path_get_indices(path)[0]);
diff --git a/gtk/gtkmenushell.c b/gtk/gtkmenushell.c
index 9aee0f1..978d2db 100644
--- a/gtk/gtkmenushell.c
+++ b/gtk/gtkmenushell.c
@@ -1819,7 +1819,7 @@ _gtk_menu_shell_get_grab_device (GtkMenuShell  *menu_shell)
 {
   GtkMenuShellPrivate *priv;
 
-  g_return_val_if_fail (GTK_IS_MENU_SHELL (menu_shell), FALSE);
+  g_return_val_if_fail (GTK_IS_MENU_SHELL (menu_shell), NULL);
 
   priv = GTK_MENU_SHELL_GET_PRIVATE (menu_shell);
 



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