diff options
author | Guy Harris <gharris@sonic.net> | 2021-04-13 01:47:10 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-04-13 01:47:10 -0700 |
commit | 9e05d40825c4eab85a50ca2ed647acd4dffacbec (patch) | |
tree | 2b764e2702f11380b3ca2068f7c862695aed26e6 /tshark.c | |
parent | 9b70baac96430598b24ac9d6f14d14c80151f2e4 (diff) |
tshark.c, ui/qt/main.cpp: fix indentation to match what it's supposed to be.
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 74 |
1 files changed, 37 insertions, 37 deletions
@@ -2187,48 +2187,48 @@ main(int argc, char *argv[]) /* if requested, list the link layer types and exit */ if (caps_queries) { - guint i; + guint i; - /* Get the list of link-layer types for the capture devices. */ - for (i = 0; i < global_capture_opts.ifaces->len; i++) { - interface_options *interface_opts; - if_capabilities_t *caps; - char *auth_str = NULL; - int if_caps_queries = caps_queries; + /* Get the list of link-layer types for the capture devices. */ + for (i = 0; i < global_capture_opts.ifaces->len; i++) { + interface_options *interface_opts; + if_capabilities_t *caps; + char *auth_str = NULL; + int if_caps_queries = caps_queries; - interface_opts = &g_array_index(global_capture_opts.ifaces, interface_options, i); + interface_opts = &g_array_index(global_capture_opts.ifaces, interface_options, i); #ifdef HAVE_PCAP_REMOTE - if (interface_opts->auth_type == CAPTURE_AUTH_PWD) { - auth_str = g_strdup_printf("%s:%s", interface_opts->auth_username, interface_opts->auth_password); - } + if (interface_opts->auth_type == CAPTURE_AUTH_PWD) { + auth_str = g_strdup_printf("%s:%s", interface_opts->auth_username, interface_opts->auth_password); + } #endif - caps = capture_get_if_capabilities(interface_opts->name, interface_opts->monitor_mode, - auth_str, &err_str, &err_str_secondary, NULL); - g_free(auth_str); - if (caps == NULL) { - cmdarg_err("%s%s%s", err_str, err_str_secondary ? "\n" : "", err_str_secondary ? err_str_secondary : ""); - g_free(err_str); - g_free(err_str_secondary); - exit_status = INVALID_CAPABILITY; - goto clean_exit; - } - if ((if_caps_queries & CAPS_QUERY_LINK_TYPES) && caps->data_link_types == NULL) { - cmdarg_err("The capture device \"%s\" has no data link types.", interface_opts->name); - exit_status = IFACE_HAS_NO_LINK_TYPES; - goto clean_exit; - } - if ((if_caps_queries & CAPS_QUERY_TIMESTAMP_TYPES) && caps->timestamp_types == NULL) { - cmdarg_err("The capture device \"%s\" has no timestamp types.", interface_opts->name); - exit_status = INVALID_TIMESTAMP_TYPE; - goto clean_exit; - } - if (interface_opts->monitor_mode) - if_caps_queries |= CAPS_MONITOR_MODE; - capture_opts_print_if_capabilities(caps, interface_opts->name, if_caps_queries); - free_if_capabilities(caps); + caps = capture_get_if_capabilities(interface_opts->name, interface_opts->monitor_mode, + auth_str, &err_str, &err_str_secondary, NULL); + g_free(auth_str); + if (caps == NULL) { + cmdarg_err("%s%s%s", err_str, err_str_secondary ? "\n" : "", err_str_secondary ? err_str_secondary : ""); + g_free(err_str); + g_free(err_str_secondary); + exit_status = INVALID_CAPABILITY; + goto clean_exit; } - exit_status = EXIT_SUCCESS; - goto clean_exit; + if ((if_caps_queries & CAPS_QUERY_LINK_TYPES) && caps->data_link_types == NULL) { + cmdarg_err("The capture device \"%s\" has no data link types.", interface_opts->name); + exit_status = IFACE_HAS_NO_LINK_TYPES; + goto clean_exit; + } + if ((if_caps_queries & CAPS_QUERY_TIMESTAMP_TYPES) && caps->timestamp_types == NULL) { + cmdarg_err("The capture device \"%s\" has no timestamp types.", interface_opts->name); + exit_status = INVALID_TIMESTAMP_TYPE; + goto clean_exit; + } + if (interface_opts->monitor_mode) + if_caps_queries |= CAPS_MONITOR_MODE; + capture_opts_print_if_capabilities(caps, interface_opts->name, if_caps_queries); + free_if_capabilities(caps); + } + exit_status = EXIT_SUCCESS; + goto clean_exit; } /* |