[gtk+/gtk-3-22] Tooltip: Avoid redundant variable initialisations
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] Tooltip: Avoid redundant variable initialisations
- Date: Mon, 20 Mar 2017 21:19:06 +0000 (UTC)
commit 3178a7a301a05d184d603a6ccb9abeed195136ae
Author: Daniel Boles <dboles src gnome org>
Date: Mon Mar 20 21:04:49 2017 +0000
Tooltip: Avoid redundant variable initialisations
has_tooltip_widget was assigned twice in immediate succession.
return_value is not used anywhere else in this function since commit
14a864c8b55dfe92f8957499f12a3f9303188a12 and does not need a default
value anymore, so move it to the inner scope and don't init to NULL.
gtk/gtktooltip.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index ff98de1..19a4963 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -1417,8 +1417,7 @@ static void
gtk_tooltip_handle_event_internal (GdkEvent *event)
{
gint x, y;
- gboolean return_value = FALSE;
- GtkWidget *has_tooltip_widget = NULL;
+ GtkWidget *has_tooltip_widget;
GdkDisplay *display;
GtkTooltip *current_tooltip;
@@ -1434,6 +1433,8 @@ gtk_tooltip_handle_event_internal (GdkEvent *event)
if (current_tooltip && current_tooltip->keyboard_mode_enabled)
{
+ gboolean return_value;
+
has_tooltip_widget = current_tooltip->keyboard_widget;
if (!has_tooltip_widget)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]