diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-12-26 18:36:15 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-12-27 02:36:56 +0000 |
commit | 4ed34c5e1cceaa643cb6af6f8ca8c5a9f31f37b2 (patch) | |
tree | 70f9522d35bc0da97b3f6f9058d0f8d4a25b8cfd /tfshark.c | |
parent | 40903e85df78430dfd02112ef03538ebd455ed19 (diff) | |
download | wireshark-4ed34c5e1cceaa643cb6af6f8ca8c5a9f31f37b2.tar.gz |
Add an (empty) list of long options to tfshark.
Clean up some indentation and comments while we're at it.
Change-Id: If3dfee74d8553a797c0d831a5956fd227a9d1ec9
Reviewed-on: https://code.wireshark.org/review/6070
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tfshark.c')
-rw-r--r-- | tfshark.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -762,6 +762,9 @@ main(int argc, char *argv[]) GString *runtime_info_str; char *init_progfile_dir_error; int opt; + struct option long_options[] = { + {0, 0, 0, 0 } + }; gboolean arg_error = FALSE; char *gpf_path, *pf_path; @@ -840,7 +843,7 @@ main(int argc, char *argv[]) /* * In order to have the -X opts assigned before the wslua machine starts - * we need to call getopts before epan_init() gets called. + * we need to call getopt_long before epan_init() gets called. * * In order to handle, for example, -o options, we also need to call it * *after* epan_init() gets called, so that the dissectors have had a @@ -1098,7 +1101,7 @@ main(int argc, char *argv[]) opterr = 1; /* Now get our args */ - while ((opt = getopt(argc, argv, optstring)) != -1) { + while ((opt = getopt_long(argc, argv, optstring, long_options, NULL)) != -1) { switch (opt) { case '2': /* Perform two pass analysis */ perform_two_pass_analysis = TRUE; |