From 93ac8364f1397f1bb758d9387016b1cd0fff3eb0 Mon Sep 17 00:00:00 2001 From: Jeff Morriss Date: Sun, 27 Mar 2016 11:35:36 -0400 Subject: [PATCH] Remove an unused variable from both the Gtk and Qt UIs. Change-Id: I4c7c5aeaa1fa452605cf02a5c86dfe161c451f65 Reviewed-on: https://code.wireshark.org/review/14654 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Jeff Morriss --- ui/gtk/file_dlg.c | 10 +--------- ui/qt/wireshark_application.cpp | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/ui/gtk/file_dlg.c b/ui/gtk/file_dlg.c index fa7c3f1fd7..aff41f0098 100644 --- a/ui/gtk/file_dlg.c +++ b/ui/gtk/file_dlg.c @@ -58,7 +58,6 @@ static gchar *last_open_dir = NULL; -static gboolean updated_last_open_dir = FALSE; static void file_selection_browse_destroy_cb(GtkWidget *win, GtkWidget* file_te); @@ -447,15 +446,8 @@ set_last_open_dir(const char *dirname) new_last_open_dir = g_strconcat(dirname, G_DIR_SEPARATOR_S, NULL); } - - if (last_open_dir == NULL || - strcmp(last_open_dir, new_last_open_dir) != 0) - updated_last_open_dir = TRUE; - } - else { + } else { new_last_open_dir = NULL; - if (last_open_dir != NULL) - updated_last_open_dir = TRUE; } g_free(last_open_dir); diff --git a/ui/qt/wireshark_application.cpp b/ui/qt/wireshark_application.cpp index eaf679aa29..eeade6438c 100644 --- a/ui/qt/wireshark_application.cpp +++ b/ui/qt/wireshark_application.cpp @@ -97,7 +97,6 @@ WiresharkApplication *wsApp = NULL; // MUST be UTF-8 static char *last_open_dir = NULL; -static bool updated_last_open_dir = FALSE; static QList recent_items_; static QHash > dynamic_menu_groups_; static QHash > added_menu_groups_; @@ -461,15 +460,8 @@ void WiresharkApplication::setLastOpenDir(const char *dir_name) new_last_open_dir = g_strconcat(dir_name, G_DIR_SEPARATOR_S, (char *)NULL); } - - if (last_open_dir == NULL || - strcmp(last_open_dir, new_last_open_dir) != 0) - updated_last_open_dir = TRUE; - } - else { + } else { new_last_open_dir = NULL; - if (last_open_dir != NULL) - updated_last_open_dir = TRUE; } g_free(last_open_dir);