Search Linux Wireless

Re: [PATCH] ath9k: Properly assign boolean types Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@xxxxxxxxxxx>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 25, 2010 at 11:58 AM, Ben Greear <greearb@xxxxxxxxxxxxxxx> wrote:
> On 10/25/2010 12:16 AM, Mohammed Shafi Shajakhan wrote:
>> -       is_cw40 = sta->ht_cap.cap&  IEEE80211_HT_CAP_SUP_WIDTH_20_40;
>> +       is_cw40 = (sta->ht_cap.cap&  IEEE80211_HT_CAP_SUP_WIDTH_20_40) ?
>> +               true : false;
>
> Maybe use:
> is_cw40 = !!(sta->ht_cap.cap&  IEEE80211_HT_CAP_SUP_WIDTH_20_40);
>
> Seems a bit simpler to me...

Agreed, !! is idiomatic.

-- 
Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux