This patch removes unnecessary comparisons to bool.
Issue found by coccinelle:
drivers/staging/rtl8723bs/core/rtw_ap.c:2159:5-11: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_cmd.c:1741:7-17: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:360:5-15: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:360:28-39: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_mlme.c:1675:6-10: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6766:8-21: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:181:5-40: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_wlan_util.c:748:14-42: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_xmit.c:2429:15-47: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_xmit.c:2458:7-17: WARNING: Comparison to bool
drivers/staging/rtl8723bs/core/rtw_xmit.c:2524:8-18: WARNING: Comparison to bool
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1653:13-36: WARNING: Comparison to bool
Signed-off-by: Jeeeun Evans <jeeeunevans@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (!psta)
return beacon_updated;
- if (active == true) {
+ if (active) {
/* tear down Rx AMPDU */
send_delba(padapter, 0, psta->hwaddr);/* recipient */
pstapriv->tim_bitmap &= ~BIT(0);
pstapriv->sta_dz_bitmap &= ~BIT(0);
- if (update_tim == true)
+ if (update_tim)
update_beacon(padapter, _TIM_IE_, NULL, true);
} else {/* re check again */
rtw_chk_hi_queue_cmd(padapter);
if (!bssid || rtw_validate_bssid(bssid) == false)
bssid_valid = false;
- if (ssid_valid == false && bssid_valid == false) {
+ if (!ssid_valid && !bssid_valid) {
DBG_871X(FUNC_ADPT_FMT" ssid:%p, ssid_valid:%d, bssid:%p, bssid_valid:%d\n",
FUNC_ADPT_ARG(padapter), ssid, ssid_valid, bssid, bssid_valid);
status = _FAIL;
roam_target = pmlmepriv->roam_network;
}
- if (roam == true) {
+ if (roam) {
if (rtw_to_roam(adapter) > 0)
rtw_dec_to_roam(adapter); /* this stadel_event is caused by roaming, decrease to_roam */
else if (rtw_to_roam(adapter) == 0)
*offset = cur_ch_offset;
}
- return connect_allow == true ? _SUCCESS : _FAIL;
+ return connect_allow ? _SUCCESS : _FAIL;
}
/* Find union about ch, bw, ch_offset of all linked/linking interfaces */
if (pwrpriv->ips_mode_req == IPS_NONE)
goto exit;
- if (rtw_pwr_unassociated_idle(padapter) == false)
+ if (!rtw_pwr_unassociated_idle(padapter))
goto exit;
if ((pwrpriv->rf_pwrstate == rf_on) && ((pwrpriv->pwr_state_check_cnts%4) == 0)) {
i = _rtw_camid_search(adapter, addr, kid);
if (i >= 0) {
/* Fix issue that pairwise and group key have same key id. Pairwise key first, group key can overwirte group only(ex: rekey) */
- if (sta || _rtw_camid_is_gk(adapter, i) == true)
+ if (sta || _rtw_camid_is_gk(adapter, i))
cam_id = i;
else
DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT" group key id:%u the same key id as pairwise key\n"
/* DBG_871X("directly xmit pspoll_triggered packet\n"); */
/* pattrib->triggered = 0; */
- if (bmcst && xmitframe_hiq_filter(pxmitframe) == true)
+ if (bmcst && xmitframe_hiq_filter(pxmitframe))
pattrib->qsel = 0x11;/* HIQ */
return ret;
/* DBG_871X("enqueue, sq_len =%d, tim =%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
- if (update_tim == true) {
+ if (update_tim) {
update_beacon(padapter, _TIM_IE_, NULL, true);
} else {
chk_bmc_sleepq_cmd(padapter);
/* DBG_871X("enqueue, sq_len =%d, tim =%x\n", psta->sleepq_len, pstapriv->tim_bitmap); */
- if (update_tim == true)
+ if (update_tim)
/* DBG_871X("sleepq_len == 1, update BCNTIM\n"); */
/* upate BCN for TIM IE */
update_beacon(padapter, _TIM_IE_, NULL, true);
}
check_need_indicate_scan_done:
- if (true == need_indicate_scan_done)
+ if (need_indicate_scan_done)
{
rtw_cfg80211_surveydone_event_callback(padapter);
rtw_cfg80211_indicate_scan_done(padapter, false);