From: Andreas Fenkart Date: Thu, 10 Mar 2016 08:44:07 +0000 (+0100) Subject: mwifiex: scan: simplify ternary operators using gnu extension X-Git-Tag: v4.7-rc1~154^2~146^2~85 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2ccf7cef0cf984241d0b6932ed1cfb1e0d6587d5;p=karo-tx-linux.git 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 Signed-off-by: Andreas Fenkart Signed-off-by: Kalle Valo --- 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,