Commit 2ccf7cef authored by Andreas Fenkart's avatar Andreas Fenkart Committed by Kalle Valo

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#ConditionalsReviewed-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: default avatarAndreas Fenkart <afenkart@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 38329568
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment