summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/marvell/mwifiex/scan.c
diff options
context:
space:
mode:
authorAndreas Fenkart <afenkart@gmail.com>2016-03-10 11:44:07 +0300
committerKalle Valo <kvalo@codeaurora.org>2016-04-15 21:34:45 +0300
commit2ccf7cef0cf984241d0b6932ed1cfb1e0d6587d5 (patch)
tree009ae90b1ae721f0eecc4e9175ef8172350f8146 /drivers/net/wireless/marvell/mwifiex/scan.c
parent38329568c3f7075c7751984a65e16a9c7fc186bd (diff)
downloadlinux-2ccf7cef0cf984241d0b6932ed1cfb1e0d6587d5.tar.xz
mwifiex: scan: simplify ternary operators using gnu extension
"x ? x : y" can be simplified as "x ? : y" https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html#Conditionals Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Andreas Fenkart <afenkart@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/scan.c')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/scan.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c
index e926d3ab7286..11f8a608b8af 100644
--- a/drivers/net/wireless/marvell/mwifiex/scan.c
+++ b/drivers/net/wireless/marvell/mwifiex/scan.c
@@ -900,14 +900,11 @@ mwifiex_config_scan(struct mwifiex_private *priv,
/* Set the BSS type scan filter, use Adapter setting if
unset */
scan_cfg_out->bss_mode =
- (user_scan_in->bss_mode ? (u8) user_scan_in->
- bss_mode : (u8) adapter->scan_mode);
+ (u8)(user_scan_in->bss_mode ?: adapter->scan_mode);
/* Set the number of probes to send, use Adapter setting
if unset */
- num_probes =
- (user_scan_in->num_probes ? user_scan_in->
- num_probes : adapter->scan_probes);
+ num_probes = user_scan_in->num_probes ?: adapter->scan_probes;
/*
* Set the BSSID filter to the incoming configuration,