[PATCH 3/3] staging: rtl8723bs: Use true/false instead of 1/0

Erick Karanja posted 3 patches 1 month ago
There is a newer version of this series
[PATCH 3/3] staging: rtl8723bs: Use true/false instead of 1/0
Posted by Erick Karanja 1 month ago
    standardize boolean representation by replacing 1/0
    with true/false in cases where boolean logic is implied.
    This improves code clarity and aligns with the kernel’s bool type usage.

Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index a389ba5ecc6f..fd04dbacb50f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -1358,7 +1358,7 @@ static signed int validate_80211w_mgmt(struct adapter *adapter, union recv_frame
 			u8 *mgmt_DATA;
 			u32 data_len = 0;
 
-			pattrib->bdecrypted = 0;
+			pattrib->bdecrypted = false;
 			pattrib->encrypt = _AES_;
 			pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
 			/* set iv and icv length */
-- 
2.43.0

Re: [PATCH 3/3] staging: rtl8723bs: Use true/false instead of 1/0
Posted by Julia Lawall 1 month ago
On Wed, 2 Apr 2025, Erick Karanja wrote:

>     standardize boolean representation by replacing 1/0

Start with a capital letter.  And why is the message indented?

julia

>     with true/false in cases where boolean logic is implied.
>     This improves code clarity and aligns with the kernel’s bool type usage.
>
> Signed-off-by: Erick Karanja <karanja99erick@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
> index a389ba5ecc6f..fd04dbacb50f 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_recv.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
> @@ -1358,7 +1358,7 @@ static signed int validate_80211w_mgmt(struct adapter *adapter, union recv_frame
>  			u8 *mgmt_DATA;
>  			u32 data_len = 0;
>
> -			pattrib->bdecrypted = 0;
> +			pattrib->bdecrypted = false;
>  			pattrib->encrypt = _AES_;
>  			pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
>  			/* set iv and icv length */
> --
> 2.43.0
>
>
>