aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-06-19 09:29:21 -0700
committerGuy Harris <guy@alum.mit.edu>2016-06-19 16:29:39 +0000
commit6febf9b74046b31b65fe4cfebf34b7d59c9d7a6b (patch)
treeb964410c0d3e82bc5ea3c1bea3c2f08cb6989b4e
parentbb44b48192f2091a81d7f978fb7f615d3cf23c4b (diff)
downloadwireshark-6febf9b74046b31b65fe4cfebf34b7d59c9d7a6b.tar.gz
wireshark-6febf9b74046b31b65fe4cfebf34b7d59c9d7a6b.tar.bz2
wireshark-6febf9b74046b31b65fe4cfebf34b7d59c9d7a6b.zip
Get rid of an unused variable; set a structure member.
There's no need for the capture_option_specified variable, but we *do* need to initialize the capture_option_specified member of *param_info before parsing the flags. Change-Id: I89d0b8c338c2784742b21ba4e854f702ce491849 Reviewed-on: https://code.wireshark.org/review/16017 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--ui/commandline.c3
-rw-r--r--wireshark-qt.cpp1
2 files changed, 3 insertions, 1 deletions
diff --git a/ui/commandline.c b/ui/commandline.c
index 49b99f44c7..4e6f28dba8 100644
--- a/ui/commandline.c
+++ b/ui/commandline.c
@@ -231,6 +231,9 @@ void commandline_capture_options(int argc, char *argv[], commandline_capture_par
*/
opterr = 0;
+#ifndef HAVE_LIBPCAP
+ param_info->capture_option_specified = FALSE;
+#endif
while ((opt = getopt_long(argc, argv, optstring, long_options, NULL)) != -1) {
switch (opt) {
case 'C': /* Configuration Profile */
diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp
index 6b54f99f5b..f332dc455a 100644
--- a/wireshark-qt.cpp
+++ b/wireshark-qt.cpp
@@ -330,7 +330,6 @@ int main(int argc, char *argv[])
gchar *err_str;
int status;
#else
- gboolean capture_option_specified = FALSE;
#ifdef _WIN32
#ifdef HAVE_AIRPCAP
gchar *err_str;