staging: rtl8188eu: fix comparsions to true
authorMichael Straube <straube.linux@gmail.com>
Sat, 21 Jul 2018 18:57:39 +0000 (20:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jul 2018 12:02:00 +0000 (14:02 +0200)
Use if(x) instead of if(x == true).

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ieee80211.c
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c

index d48840869307d11df2e0a4e6af6c2619b6e56e3f..9db19724f168ca8e42a93974b2a8692009818c78 100644 (file)
@@ -101,14 +101,14 @@ bool rtw_is_cckratesonly_included(u8 *rate)
 int rtw_check_network_type(unsigned char *rate, int ratelen, int channel)
 {
        if (channel > 14) {
-               if ((rtw_is_cckrates_included(rate)) == true)
+               if (rtw_is_cckrates_included(rate))
                        return WIRELESS_INVALID;
                else
                        return WIRELESS_11A;
        } else {  /*  could be pure B, pure G, or B/G */
-               if ((rtw_is_cckratesonly_included(rate)) == true)
+               if (rtw_is_cckratesonly_included(rate))
                        return WIRELESS_11B;
-               else if ((rtw_is_cckrates_included(rate)) == true)
+               else if (rtw_is_cckrates_included(rate))
                        return  WIRELESS_11BG;
                else
                        return WIRELESS_11G;
index 8da43022bb40626b08765952a210e10171d43bd4..221fae22bab6098d657469c8e8c31211338f216f 100644 (file)
@@ -642,12 +642,12 @@ static int rtw_wx_get_name(struct net_device *dev,
 
                prates = &pcur_bss->SupportedRates;
 
-               if (rtw_is_cckratesonly_included((u8 *)prates) == true) {
+               if (rtw_is_cckratesonly_included((u8 *)prates)) {
                        if (ht_cap)
                                snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bn");
                        else
                                snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11b");
-               } else if ((rtw_is_cckrates_included((u8 *)prates)) == true) {
+               } else if (rtw_is_cckrates_included((u8 *)prates)) {
                        if (ht_cap)
                                snprintf(wrqu->name, IFNAMSIZ, "IEEE 802.11bgn");
                        else