aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-04-14 23:36:07 -0700
committerGuy Harris <gharris@sonic.net>2021-04-14 23:36:07 -0700
commit776957ec8bc9d2b2749c50758d5d10c6aeabd062 (patch)
tree2abe47ff45387e6340461fc84af219b2862bd496 /ui
parenta9b3dfbbc7e39de5b911006600d269293f3862fb (diff)
Clean up the "print interface link-layer/time stamp types" loop.
Initialize the exit status before the loop, and just break out of the loop if something fails, so that the code following the loop can destroy the console in Wireshark on Windows and then go to the clean exit code.
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/main.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/ui/qt/main.cpp b/ui/qt/main.cpp
index 7542455488..8a6d57dcd5 100644
--- a/ui/qt/main.cpp
+++ b/ui/qt/main.cpp
@@ -895,6 +895,7 @@ int main(int argc, char *qt_argv[])
create_console();
#endif /* _WIN32 */
/* Get the list of link-layer types for the capture devices. */
+ ret_val = EXIT_SUCCESS;
for (i = 0; i < global_capture_opts.ifaces->len; i++) {
interface_options *interface_opts;
if_capabilities_t *caps;
@@ -914,19 +915,15 @@ int main(int argc, char *qt_argv[])
g_free(err_str);
g_free(err_str_secondary);
ret_val = INVALID_CAPABILITY;
- goto clean_exit;
+ break;
}
ret_val = capture_opts_print_if_capabilities(caps, interface_opts,
caps_queries);
free_if_capabilities(caps);
if (ret_val != EXIT_SUCCESS) {
-#ifdef _WIN32
- destroy_console();
-#endif /* _WIN32 */
- goto clean_exit;
+ break;
}
}
- ret_val = EXIT_SUCCESS;
#ifdef _WIN32
destroy_console();
#endif /* _WIN32 */