aboutsummaryrefslogtreecommitdiffstats
path: root/tshark.c
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2021-06-14 16:51:19 +0100
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-06-14 22:05:35 +0000
commite86ac706ca534dc079523727ba8f96e9b5d80a5b (patch)
tree2bb8e889a2a5d693e48e8e1697f7f3625ad7c307 /tshark.c
parent2d2cfa8d14a8c99ebfb924097a88e0095d63424b (diff)
wslog: Parse cmd line options in one pass
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/tshark.c b/tshark.c
index 023fe0a9fe..3fed589a8e 100644
--- a/tshark.c
+++ b/tshark.c
@@ -781,12 +781,8 @@ main(int argc, char *argv[])
/* Command line options are parsed too late to configure logging, do it
manually. */
- const char *opt_err_val;
- if ((opt_err_val = ws_log_set_level_args(&argc, argv)) != NULL) {
- cmdarg_err("Invalid log level \"%s\"", opt_err_val);
+ if (ws_log_parse_args(&argc, argv, cmdarg_err) != 0)
return INVALID_OPTION;
- }
- ws_log_set_domain_filter_args(&argc, argv);
ws_debug("tshark started with %d args", argc);