From 234d8eacec8807924945df55821b79f90e371c65 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 19 Jun 2016 14:12:30 -0700 Subject: Pass the info strings directly to commandline_early_options(). Just pass them directly as arguments, don't stuff them into a structure. Change-Id: Iac84226f54898bc953011bca64795e9049762905 Reviewed-on: https://code.wireshark.org/review/16022 Reviewed-by: Guy Harris --- wireshark-qt.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'wireshark-qt.cpp') diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index 809c9eba7d..5e5743f611 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -336,14 +336,12 @@ int main(int argc, char *argv[]) #endif #endif #endif - commandline_capture_param_info_t capture_param_info; + GString *comp_info_str = NULL; + GString *runtime_info_str = NULL; commandline_param_info_t commandline_info; QString dfilter, read_filter; - /* Initialize the capture arguments */ - memset(&capture_param_info, 0, sizeof(capture_param_info)); - cmdarg_err_init(wireshark_cmdarg_err, wireshark_cmdarg_err_cont); // In Qt 5, C strings are treated always as UTF-8 when converted to @@ -436,11 +434,11 @@ int main(int argc, char *argv[]) #endif /* _WIN32 */ /* Get the compile-time version information string */ - capture_param_info.comp_info_str = get_compiled_version_info(get_wireshark_qt_compiled_info, + comp_info_str = get_compiled_version_info(get_wireshark_qt_compiled_info, get_gui_compiled_info); /* Assemble the run-time version information string */ - capture_param_info.runtime_info_str = get_runtime_version_info(get_wireshark_runtime_info); + runtime_info_str = get_runtime_version_info(get_wireshark_runtime_info); profile_store_persconffiles(TRUE); @@ -453,7 +451,7 @@ int main(int argc, char *argv[]) g_free(rf_path); } - commandline_early_options(argc, ws_argv, &capture_param_info); + commandline_early_options(argc, ws_argv, comp_info_str, runtime_info_str); #ifdef _WIN32 reset_library_path(); @@ -478,7 +476,7 @@ int main(int argc, char *argv[]) "%s" "\n" "%s", - get_ws_vcs_version_info(), capture_param_info.comp_info_str->str, capture_param_info.runtime_info_str->str); + get_ws_vcs_version_info(), comp_info_str->str, runtime_info_str->str); #ifdef _WIN32 /* Start windows sockets */ -- cgit v1.2.1