summaryrefslogtreecommitdiff
path: root/tfshark.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-11-14 15:59:38 -0800
committerGuy Harris <guy@alum.mit.edu>2014-11-15 00:27:48 +0000
commit225c86f7a27e2fd8cae24a472443580f174e14e9 (patch)
treedc22901e2716290715149e96cdab9ed27a4aba02 /tfshark.c
parent355458061a76e82d42df24f50c2e9643c10114e7 (diff)
downloadwireshark-225c86f7a27e2fd8cae24a472443580f174e14e9.tar.gz
Do the "-z help" processing separately, and do it for Wireshark as well.
Yes, Wireshark does a bunch of GUI stuff, and then takes the window down before printing the help, but the same is true for some command-line error messages as well. Change-Id: Id501468416c83308e4c0a9e7a66116d8d33a9d84 Reviewed-on: https://code.wireshark.org/review/5317 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tfshark.c')
-rw-r--r--tfshark.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tfshark.c b/tfshark.c
index 38b94199c9..2cbe7e7485 100644
--- a/tfshark.c
+++ b/tfshark.c
@@ -1300,12 +1300,12 @@ main(int argc, char *argv[])
by the preferences set callback) from being used as
part of a tap filter. Instead, we just add the argument
to a list of stat arguments. */
+ if (strcmp("help", optarg) == 0) {
+ fprintf(stderr, "tfshark: The available statistics for the \"-z\" option are:\n");
+ list_stat_cmd_args();
+ return 0;
+ }
if (!process_stat_cmd_arg(optarg)) {
- if (strcmp("help", optarg)==0) {
- fprintf(stderr, "tfshark: The available statistics for the \"-z\" option are:\n");
- list_stat_cmd_args();
- return 0;
- }
cmdarg_err("Invalid -z argument \"%s\"; it must be one of:", optarg);
list_stat_cmd_args();
return 1;