summaryrefslogtreecommitdiff
path: root/tfshark.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-12-26 18:36:15 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-27 02:36:56 +0000
commit4ed34c5e1cceaa643cb6af6f8ca8c5a9f31f37b2 (patch)
tree70f9522d35bc0da97b3f6f9058d0f8d4a25b8cfd /tfshark.c
parent40903e85df78430dfd02112ef03538ebd455ed19 (diff)
downloadwireshark-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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tfshark.c b/tfshark.c
index e32d9a1378..d3d7c1b199 100644
--- a/tfshark.c
+++ b/tfshark.c
@@ -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;