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: <20230220143758.4396-1-zzutcyha@163.com>
Date:   Mon, 20 Feb 2023 14:37:58 +0000
From:   Shibo Li <zzutcyha@....com>
To:     Larry Finger <Larry.Finger@...inger.net>,
        Florian Schilhabel <florian.c.schilhabel@...glemail.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Cc:     Shibo Li <zzutcyha@....com>
Subject: [PATCH] staging: rtl8712: Fix Sparse warnings in rtl871x_ioctl_linux.c

This patch fixes the following warning in rtl871x_ioctl_linux.c

WARNING: Avoid multiple line dereference - prefer 'pnetwork->network.InfrastructureMode'
+                                       if (pnetwork->network.
+                                               InfrastructureMode

WARNING: Avoid multiple line dereference - prefer 'padapter->mlmepriv.cur_network.network'
+                                               padapter->mlmepriv.
+                                               cur_network.network.

WARNING: Avoid multiple line dereference - prefer 'cur_network.network.InfrastructureMode'
+                                               cur_network.network.
+                                               InfrastructureMode)

Signed-off-by: Shibo Li <zzutcyha@....com>
---
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 36f6904d25ab..6673befeb2f0 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -1268,14 +1268,11 @@ static int r8711_wx_set_essid(struct net_device *dev,
 			if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength))
 			    && (pnetwork->network.Ssid.SsidLength ==
 			     ndis_ssid.SsidLength)) {
-				if (check_fwstate(pmlmepriv,
-							WIFI_ADHOC_STATE)) {
-					if (pnetwork->network.
-						InfrastructureMode
+				if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
+					if (pnetwork->network.configurationInfrastructureMode
 						!=
-						padapter->mlmepriv.
-						cur_network.network.
-						InfrastructureMode)
+						padapter->mlmepriv.assoc_by_rssi.
+						cur_network.network.InfrastructureMode)
 						continue;
 				}
 
-- 
2.39.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ