Get rid of an unused variable; set a structure member.
authorGuy Harris <guy@alum.mit.edu>
Sun, 19 Jun 2016 16:29:21 +0000 (09:29 -0700)
committerGuy Harris <guy@alum.mit.edu>
Sun, 19 Jun 2016 16:29:39 +0000 (16:29 +0000)
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>
ui/commandline.c
wireshark-qt.cpp

index 49b99f44c7e29cac8e0932251e800d33f2fd0447..4e6f28dba8e4d9f54411f4d2075bbc90b5fe0cb6 100644 (file)
@@ -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 */
index 6b54f99f5b2e7739c40d51169a2bce009384e49b..f332dc455a37787d47faa1548c78eacef60e35c5 100644 (file)
@@ -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;