diff options
author | Michael Mann <mmann78@netscape.net> | 2015-12-23 08:46:45 -0500 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2015-12-23 18:22:38 +0000 |
commit | ea2a3ac4024c8f5610042a7815443be2731b480b (patch) | |
tree | 46f079af14c228996bc83b05a305d4696c8da977 | |
parent | 40312bf2ebc30d943e1c1372877279d091462de9 (diff) |
Initialize Qt info_data_t structure in constructor.
GTK and TShark should already have structure initialized to 0 because they are global variables.
Change-Id: I43a38c58f32967d201ddf78e450b2483f28f8bd6
Reviewed-on: https://code.wireshark.org/review/12847
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
-rw-r--r-- | tshark.c | 3 | ||||
-rw-r--r-- | ui/gtk/main.c | 5 | ||||
-rw-r--r-- | ui/qt/main_window.cpp | 8 |
3 files changed, 3 insertions, 13 deletions
@@ -2564,9 +2564,6 @@ capture(void) fflush(stderr); g_string_free(str, TRUE); - /* initialize the counts hash with null */ - global_info_data.counts.counts_hash = NULL; - ret = sync_pipe_start(&global_capture_opts, &global_capture_session, &global_info_data, NULL); if (!ret) diff --git a/ui/gtk/main.c b/ui/gtk/main.c index 8bac7d6400..8eab2b5b55 100644 --- a/ui/gtk/main.c +++ b/ui/gtk/main.c @@ -3181,11 +3181,6 @@ main(int argc, char *argv[]) /* the window can be sized only, if it's not already shown, so do it now! */ main_load_window_geometry(top_level); -#ifdef HAVE_LIBPCAP - /* initialize the packet counters */ - global_info_data.counts.counts_hash = NULL; -#endif - g_timeout_add(info_update_freq, resolv_update_cb, NULL); /* If we were given the name of a capture file, read it in now; diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index b4e660c1de..65dd7a12fa 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -226,6 +226,9 @@ MainWindow::MainWindow(QWidget *parent) : freeze_focus_(NULL), capture_stopping_(false), capture_filter_valid_(false), +#ifdef HAVE_LIBPCAP + info_data_(), +#endif #ifdef _WIN32 pipe_timer_(NULL) #else @@ -612,11 +615,6 @@ MainWindow::MainWindow(QWidget *parent) : plugin_if_register_gui_cb(PLUGIN_IF_PREFERENCE_SAVE, plugin_if_mainwindow_preference); plugin_if_register_gui_cb(PLUGIN_IF_GOTO_FRAME, plugin_if_mainwindow_gotoframe); -#ifdef HAVE_LIBPCAP - /* Initialize packet counter */ - info_data_.counts.counts_hash = NULL; -#endif - main_ui_->mainStack->setCurrentWidget(main_welcome_); } |