diff options
author | tuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-31 14:49:21 +0000 |
---|---|---|
committer | tuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-05-31 14:49:21 +0000 |
commit | bf3b6200ebf144fdb5620ff1815bb1bda125d288 (patch) | |
tree | eb50fdaf9f252918e5d1788b0148e66f152a3fb2 /capture_opts.c | |
parent | 05402df5b76656e0c80521375efb605a26579396 (diff) |
Get rid of has_cfilter to simplify the handling of multiple interfaces.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37478 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_opts.c')
-rw-r--r-- | capture_opts.c | 5 |
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) { |