summaryrefslogtreecommitdiff
path: root/capture_opts.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2011-05-31 14:49:21 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2011-05-31 14:49:21 +0000
commit8f8f0e9ad6fdf0cf3ad12cb2cd1f032da517932c (patch)
treeeb50fdaf9f252918e5d1788b0148e66f152a3fb2 /capture_opts.c
parent6516aa9864d056fd327de0a1c76ed11ccea00317 (diff)
downloadwireshark-8f8f0e9ad6fdf0cf3ad12cb2cd1f032da517932c.tar.gz
Get rid of has_cfilter to simplify the handling of multiple interfaces.
svn path=/trunk/; revision=37478
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/capture_opts.c b/capture_opts.c
index 5770211544..e558723ddf 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -56,13 +56,13 @@ void
capture_opts_init(capture_options *capture_opts, void *cf)
{
capture_opts->cf = cf;
- capture_opts->cfilter = g_strdup(""); /* No capture filter string specified */
+ capture_opts->cfilter = NULL; /* No capture filter string specified */
capture_opts->iface = NULL; /* Default is "pick the first interface" */
capture_opts->iface_descr = NULL;
capture_opts->ifaces = g_array_new(FALSE, FALSE, sizeof(interface_options));
capture_opts->default_options.name = NULL;
capture_opts->default_options.descr = NULL;
- capture_opts->default_options.cfilter = g_strdup("");
+ capture_opts->default_options.cfilter = NULL;
capture_opts->default_options.snaplen = WTAP_MAX_PACKET_SIZE;
capture_opts->default_options.linktype = -1;
capture_opts->default_options.promisc_mode = TRUE;
@@ -658,7 +658,6 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_
capture_opts->autostop_packets = get_positive_int(optarg_str_p, "packet count");
break;
case 'f': /* capture filter */
- capture_opts->has_cfilter = TRUE;
g_free(capture_opts->cfilter);
capture_opts->cfilter = g_strdup(optarg_str_p);
if (capture_opts->ifaces->len > 0) {