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-next>] [day] [month] [year] [list]
Message-ID: <YXeC8q6IooA4N1ZF@Sauravs-MacBook-Air.local>
Date:   Tue, 26 Oct 2021 09:54:18 +0530
From:   Saurav Girepunje <saurav.girepunje@...il.com>
To:     gregkh@...uxfoundation.org, fabioaiuto83@...il.com,
        ross.schm.dev@...il.com, marcocesati@...il.com,
        matthew.v.deangelis@...il.com, linux-staging@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Cc:     saurav.girepunje@...mail.com
Subject: [PATCH] staging: rtl8723bs: core: remove local variable and goto
 statement

In the function rtw_validate_bssid() remove the goto statement.
As on goto exit label, function is returning without any cleanup.
In this function goto statement can be replace by simple return
statement, which will improve readability. After replacing
the goto statement local variable ret is also not needed. So
remove the ret local variable.

Signed-off-by: Saurav Girepunje <saurav.girepunje@...il.com>
---
 drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
index 8c11daff2d59..11e9421cad58 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c
@@ -24,15 +24,10 @@ u8 rtw_validate_bssid(u8 *bssid)

 u8 rtw_validate_ssid(struct ndis_802_11_ssid *ssid)
 {
-	u8 ret = true;
-
-	if (ssid->ssid_length > 32) {
-		ret = false;
-		goto exit;
-	}
+	if (ssid->ssid_length > 32)
+		return false;

-exit:
-	return ret;
+	return true;
 }

 u8 rtw_do_join(struct adapter *padapter)
--
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ