diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-11-14 15:59:38 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-11-15 00:27:48 +0000 |
commit | 225c86f7a27e2fd8cae24a472443580f174e14e9 (patch) | |
tree | dc22901e2716290715149e96cdab9ed27a4aba02 /tshark.c | |
parent | 355458061a76e82d42df24f50c2e9643c10114e7 (diff) |
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 'tshark.c')
-rw-r--r-- | tshark.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1645,12 +1645,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, "tshark: 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, "tshark: 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; |