diff options
author | Daniel Boles <dboles@src.gnome.org> | 2017-03-20 21:04:49 +0000 |
---|---|---|
committer | Daniel Boles <dboles@src.gnome.org> | 2017-03-20 21:13:50 +0000 |
commit | 7e38e3075e9c5d591a40b450dd1eac6c25c79c5d (patch) | |
tree | f6e863137dbbb023ff12fb79b4f64c15655d4794 | |
parent | 12b7d30a2d390fa4755828b6dc3748695c52a365 (diff) | |
download | gtk+-7e38e3075e9c5d591a40b450dd1eac6c25c79c5d.tar.gz |
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.
-rw-r--r-- | gtk/gtktooltip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index 563a95e584..ea4bf310b2 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -1388,8 +1388,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; @@ -1405,6 +1404,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; |