[Xfce4-commits] [apps/xfce4-terminal] 01/01: Remove some redundant checks against NULL
noreply at xfce.org
noreply at xfce.org
Mon Jan 7 20:41:52 CET 2019
This is an automated email from the git hooks/post-receive script.
f 2 4 0 4 p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-terminal.
commit 84fb1f818a99e574d8d7d47a4abc7e3f45da96f3
Author: Igor <f2404 at yandex.ru>
Date: Mon Jan 7 14:40:10 2019 -0500
Remove some redundant checks against NULL
Found with PVS-Studio.
---
terminal/terminal-screen.c | 2 +-
terminal/terminal-widget.c | 2 +-
terminal/terminal-window.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 1495cbb..0dbe127 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -1341,7 +1341,7 @@ relaunch_bar_response (GtkInfoBar *info_bar,
GList *children = gtk_container_get_children (GTK_CONTAINER (content_area));
GtkToggleButton *checkbox = g_list_nth_data (children, 1);
- if (G_LIKELY (checkbox != NULL) && GTK_IS_TOGGLE_BUTTON (checkbox) && gtk_toggle_button_get_active (checkbox))
+ if (GTK_IS_TOGGLE_BUTTON (checkbox) && gtk_toggle_button_get_active (checkbox))
g_object_set (G_OBJECT (screen->preferences), "misc-show-relaunch-dialog", FALSE, NULL);
}
diff --git a/terminal/terminal-widget.c b/terminal/terminal-widget.c
index acf8cb9..951fa45 100644
--- a/terminal/terminal-widget.c
+++ b/terminal/terminal-widget.c
@@ -293,7 +293,7 @@ terminal_widget_context_menu (TerminalWidget *widget,
/* prepend a separator to the menu if it does not already contain one */
children = gtk_container_get_children (GTK_CONTAINER (menu));
item_separator = g_list_nth_data (children, 0);
- if (G_LIKELY (item_separator != NULL && !GTK_IS_SEPARATOR_MENU_ITEM (item_separator)))
+ if (!GTK_IS_SEPARATOR_MENU_ITEM (item_separator))
{
item_separator = gtk_separator_menu_item_new ();
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), item_separator);
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index 809854e..f7b83e0 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -1787,7 +1787,7 @@ copy_input_popover_close (GtkWidget *popover,
gtk_widget_destroy (popover);
/* focus the terminal */
- if (G_LIKELY (window->priv->active != NULL && TERMINAL_IS_SCREEN (window->priv->active)))
+ if (TERMINAL_IS_SCREEN (window->priv->active))
terminal_screen_focus (window->priv->active);
}
@@ -2123,7 +2123,7 @@ title_popover_close (GtkWidget *popover,
window->priv->title_popover = NULL;
/* focus the terminal: bug #13754 */
- if (G_LIKELY (window->priv->active != NULL && TERMINAL_IS_SCREEN (window->priv->active)))
+ if (TERMINAL_IS_SCREEN (window->priv->active))
terminal_screen_focus (window->priv->active);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list