aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2011-06-28 16:57:42 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2011-06-28 16:57:42 +0000
commit52abc59011366f7797d327b7a926ad2ca0ed962d (patch)
tree3f6a28ced28b058269f0fa4829544e8379b79dc7 /capture_opts.c
parent92dde3023c345768febe7eedc92ae958a16c7e78 (diff)
downloadwireshark-52abc59011366f7797d327b7a926ad2ca0ed962d.tar.gz
wireshark-52abc59011366f7797d327b7a926ad2ca0ed962d.tar.bz2
wireshark-52abc59011366f7797d327b7a926ad2ca0ed962d.zip
Code cleanup.
svn path=/trunk/; revision=37820
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/capture_opts.c b/capture_opts.c
index 2da8dd2984..badd00381d 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -511,27 +511,11 @@ capture_opts_add_iface_opt(capture_options *capture_opts, const char *optarg_str
interface_opts.monitor_mode = capture_opts->default_options.monitor_mode;
#ifdef HAVE_PCAP_REMOTE
interface_opts.src_type = capture_opts->default_options.src_type;
- if (capture_opts->default_options.remote_host) {
- interface_opts.remote_host = g_strdup(capture_opts->default_options.remote_host);
- } else {
- interface_opts.remote_host = NULL;
- }
- if (capture_opts->default_options.remote_port) {
- interface_opts.remote_port = g_strdup(capture_opts->default_options.remote_port);
- } else {
- interface_opts.remote_port = NULL;
- }
+ interface_opts.remote_host = g_strdup(capture_opts->default_options.remote_host);
+ interface_opts.remote_port = g_strdup(capture_opts->default_options.remote_port);
interface_opts.auth_type = capture_opts->default_options.auth_type;
- if (capture_opts->default_options.auth_username) {
- interface_opts.auth_username = g_strdup(capture_opts->default_options.auth_username);
- } else {
- interface_opts.auth_username = NULL;
- }
- if (capture_opts->default_options.auth_password) {
- interface_opts.auth_password = g_strdup(capture_opts->default_options.auth_password);
- } else {
- interface_opts.auth_password = NULL;
- }
+ interface_opts.auth_username = g_strdup(capture_opts->default_options.auth_username);
+ interface_opts.auth_password = g_strdup(capture_opts->default_options.auth_password);
interface_opts.datatx_udp = capture_opts->default_options.datatx_udp;
interface_opts.nocap_rpcap = capture_opts->default_options.nocap_rpcap;
interface_opts.nocap_local = capture_opts->default_options.nocap_local;