staging: rtl8192u: Remove ternary operator
Relational and logical operators evaluate to either true or false. Lines with ternary operators were found using coccinelle script. In a few cases using logical && operator would suffice. Hence those were changed to improve readability. Coccinelle Script: @r@ expression A,B; symbol true,false; binary operator b = {==,!=,&&,||,>=,<=,>,<}; @@ - (A b B) ? true : false + A b B Signed-off-by: Gargi Sharma <gs051095@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
483b10084d
commit
eb1397d16f
|
@ -976,17 +976,16 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
|
||||||
//
|
//
|
||||||
HTSetConnectBwMode(ieee, (HT_CHANNEL_WIDTH)(pPeerHTCap->ChlWidth), (HT_EXTCHNL_OFFSET)(pPeerHTInfo->ExtChlOffset));
|
HTSetConnectBwMode(ieee, (HT_CHANNEL_WIDTH)(pPeerHTCap->ChlWidth), (HT_EXTCHNL_OFFSET)(pPeerHTInfo->ExtChlOffset));
|
||||||
|
|
||||||
// if (pHTInfo->bCurBW40MHz)
|
pHTInfo->bCurTxBW40MHz = (pPeerHTInfo->RecommemdedTxWidth == 1);
|
||||||
pHTInfo->bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth == 1)?true:false);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update short GI/ long GI setting
|
// Update short GI/ long GI setting
|
||||||
//
|
//
|
||||||
// TODO:
|
// TODO:
|
||||||
pHTInfo->bCurShortGI20MHz=
|
pHTInfo->bCurShortGI20MHz = pHTInfo->bRegShortGI20MHz &&
|
||||||
((pHTInfo->bRegShortGI20MHz)?((pPeerHTCap->ShortGI20Mhz==1)?true:false):false);
|
(pPeerHTCap->ShortGI20Mhz == 1);
|
||||||
pHTInfo->bCurShortGI40MHz=
|
pHTInfo->bCurShortGI40MHz = pHTInfo->bRegShortGI40MHz &&
|
||||||
((pHTInfo->bRegShortGI40MHz)?((pPeerHTCap->ShortGI40Mhz==1)?true:false):false);
|
(pPeerHTCap->ShortGI40Mhz == 1);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Config TX STBC setting
|
// Config TX STBC setting
|
||||||
|
@ -997,8 +996,8 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
|
||||||
// Config DSSS/CCK mode in 40MHz mode
|
// Config DSSS/CCK mode in 40MHz mode
|
||||||
//
|
//
|
||||||
// TODO:
|
// TODO:
|
||||||
pHTInfo->bCurSuppCCK =
|
pHTInfo->bCurSuppCCK = pHTInfo->bRegSuppCCK &&
|
||||||
((pHTInfo->bRegSuppCCK)?((pPeerHTCap->DssCCk==1)?true:false):false);
|
(pPeerHTCap->DssCCk == 1);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue