Commit 455d5f02 authored by Vihas Makwana's avatar Vihas Makwana Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: fix warnings in rtw_wlan_util



Refactor the code to fix following warnings:
    WARNING: Comparisons should place the constant on the right side of the test
    CHECK: Comparison to NULL could be written "p"

Signed-off-by: default avatarVihas Makwana <makvihas@gmail.com>
Link: https://lore.kernel.org/r/20220517140626.3716-4-makvihas@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 43ea9201
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -964,7 +964,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len)
	else
		hidden_ssid = false;

	if ((NULL != p) && (false == hidden_ssid && (*(p + 1)))) {
	if (p && (!hidden_ssid && (*(p + 1)))) {
		memcpy(bssid->Ssid.Ssid, (p + 2), *(p + 1));
		bssid->Ssid.SsidLength = *(p + 1);
	} else {