[gnome-builder] fix up a few g_return*fail calls
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] fix up a few g_return*fail calls
- Date: Sat, 11 Oct 2014 15:10:21 +0000 (UTC)
commit dd800615e654398fe854764539b1e2c265556866
Author: Ray Strode <rstrode redhat com>
Date: Sat Oct 11 11:07:25 2014 -0400
fix up a few g_return*fail calls
This commit fixes some g_return_val_if_fail and g_return_if_fail
confusion.
src/commands/gb-command-bar-item.c | 4 ++--
src/commands/gb-command-gaction-provider.c | 4 ++--
src/editor/gb-editor-vim.c | 4 ++--
src/editor/gb-source-change-gutter-renderer.c | 2 +-
src/sidebar/gb-sidebar.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/commands/gb-command-bar-item.c b/src/commands/gb-command-bar-item.c
index c357f91..056e5f5 100644
--- a/src/commands/gb-command-bar-item.c
+++ b/src/commands/gb-command-bar-item.c
@@ -78,8 +78,8 @@ static void
gb_command_bar_item_set_result (GbCommandBarItem *item,
GbCommandResult *result)
{
- g_return_val_if_fail (GB_IS_COMMAND_BAR_ITEM (item), NULL);
- g_return_val_if_fail (GB_IS_COMMAND_RESULT (result), NULL);
+ g_return_if_fail (GB_IS_COMMAND_BAR_ITEM (item));
+ g_return_if_fail (GB_IS_COMMAND_RESULT (result));
if (item->priv->result != result)
{
diff --git a/src/commands/gb-command-gaction-provider.c b/src/commands/gb-command-gaction-provider.c
index d8d235a..8952ce0 100644
--- a/src/commands/gb-command-gaction-provider.c
+++ b/src/commands/gb-command-gaction-provider.c
@@ -41,10 +41,10 @@ execute_action (GbCommand *command,
GAction *action;
GVariant *params;
- g_return_if_fail (GB_IS_COMMAND (command));
+ g_return_val_if_fail (GB_IS_COMMAND (command), NULL);
action = g_object_get_data (G_OBJECT (command), "action");
- g_return_if_fail (G_IS_ACTION (action));
+ g_return_val_if_fail (G_IS_ACTION (action), NULL);
params = g_object_get_data (G_OBJECT (command), "parameters");
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index b8526d6..b820019 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -3539,8 +3539,8 @@ gb_editor_vim_execute_command (GbEditorVim *vim,
gboolean ret = FALSE;
gchar *copy;
- g_return_if_fail (GB_IS_EDITOR_VIM (vim));
- g_return_if_fail (command);
+ g_return_val_if_fail (GB_IS_EDITOR_VIM (vim), FALSE);
+ g_return_val_if_fail (command, FALSE);
copy = g_strstrip (g_strdup (command));
func = gb_editor_vim_parse_operation (copy);
diff --git a/src/editor/gb-source-change-gutter-renderer.c b/src/editor/gb-source-change-gutter-renderer.c
index 2d3598b..df6bcd0 100644
--- a/src/editor/gb-source-change-gutter-renderer.c
+++ b/src/editor/gb-source-change-gutter-renderer.c
@@ -53,7 +53,7 @@ on_changed (GbSourceChangeMonitor *monitor,
{
GtkTextView *text_view;
- g_return_val_if_fail (GB_IS_SOURCE_CHANGE_GUTTER_RENDERER (renderer), NULL);
+ g_return_if_fail (GB_IS_SOURCE_CHANGE_GUTTER_RENDERER (renderer));
text_view = gtk_source_gutter_renderer_get_view (GTK_SOURCE_GUTTER_RENDERER (renderer));
gtk_widget_queue_draw (GTK_WIDGET (text_view));
diff --git a/src/sidebar/gb-sidebar.c b/src/sidebar/gb-sidebar.c
index 7d58b3b..8c926ab 100644
--- a/src/sidebar/gb-sidebar.c
+++ b/src/sidebar/gb-sidebar.c
@@ -514,7 +514,7 @@ gb_sidebar_get_stack (GbSidebar *sidebar)
{
GbSidebarPrivate *priv;
- g_return_if_fail (GB_IS_SIDEBAR (sidebar));
+ g_return_val_if_fail (GB_IS_SIDEBAR (sidebar), NULL);
priv = gb_sidebar_get_instance_private (sidebar);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]