lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e87acd109ea5eb4e3f8fc233788cd0dbd128407d.camel@perches.com>
Date: Sun, 25 Jan 2026 10:13:16 -0800
From: Joe Perches <joe@...ches.com>
To: Michael Huang <tehsiu.huang@...il.com>, Greg Kroah-Hartman
	 <gregkh@...uxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@...aro.org>, linux-staging@...ts.linux.dev,
 	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/7] staging: rtl8723bs: use continue statements to
 reduce indentation

On Sat, 2026-01-24 at 15:15 -0800, Michael Huang wrote:
> Refactor nested if-statements using "continue"
> statements. This flattens the logic, reduces deep indentation,
> and improves overall code readability.
[]
> diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
[]
> @@ -3684,29 +3684,29 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
>  
>  
>  		for (i = 0; i < 8; i++) {
> -			if (ICS[i][0] == 1) {

Several additional things to consider for readability

o Rename ICS to something more meaningful
o Separate the ICS[x][0] uses to another named array [8]
o Adding #defines for the array bounds 8 and 15 (or 14)
o Change the loop bounds from 1 to 0 and 15 to 14 
o Converting this/these arrays to bool
o Use boolean logic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ