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>
This commit is contained in:
Michael Mann 2015-12-23 08:46:45 -05:00 committed by Stig Bjørlykke
parent 40312bf2eb
commit ea2a3ac402
3 changed files with 3 additions and 13 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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_);
}