staging: rtl8723bs: hal: Use (true/false) in assignment to bool
authorsimran singhal <singhalsimran0@gmail.com>
Tue, 20 Jun 2017 05:27:28 +0000 (10:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jun 2017 17:36:49 +0000 (19:36 +0200)
This patch assigns (true/false) to boolean EDCCA_State instead of (1/0).
And, there is no need of comparing EDCCA_State explicitly with constant
1.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/odm_DIG.c

index 202c52f488aeff9bc2e6efe5cc6dddd34949209e..0bde9444471dad5eb5e1f7cfde7b721d3a94cc0e 100644 (file)
@@ -278,11 +278,11 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI)
 
        if (!pDM_Odm->ForceEDCCA) {
                if (pDM_Odm->RSSI_Min > pDM_Odm->AdapEn_RSSI)
-                       EDCCA_State = 1;
+                       EDCCA_State = true;
                else if (pDM_Odm->RSSI_Min < (pDM_Odm->AdapEn_RSSI - 5))
-                       EDCCA_State = 0;
+                       EDCCA_State = false;
        } else
-               EDCCA_State = 1;
+               EDCCA_State = true;
 
        if (
                pDM_Odm->bLinked &&
@@ -305,7 +305,7 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI)
                )
        );
 
-       if (EDCCA_State == 1) {
+       if (EDCCA_State) {
                Diff = IGI_target-(s8)IGI;
                TH_L2H_dmc = pDM_Odm->TH_L2H_ini + Diff;
                if (TH_L2H_dmc > 10)