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
| ||
|
Date: Sun, 8 May 2022 23:54:01 +0530 From: Vihas Makwana <makvihas@...il.com> To: Larry Finger <Larry.Finger@...inger.net>, Phillip Potter <phil@...lpotter.co.uk>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Michael Straube <straube.linux@...il.com> Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org, Dan Carpenter <dan.carpenter@...cle.com>, Pavel Skripkin <paskripkin@...il.com>, Vihas Makwana <makvihas@...il.com> Subject: [PATCH] staging: r8188eu: drop redundant if check The check for ETH_P_IP is already performed in the outer if block and inner if check is redundant. So drop the check. Signed-off-by: Vihas Makwana <makvihas@...il.com> --- drivers/staging/r8188eu/core/rtw_xmit.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_xmit.c b/drivers/staging/r8188eu/core/rtw_xmit.c index d086812f8..9a99aa5e8 100644 --- a/drivers/staging/r8188eu/core/rtw_xmit.c +++ b/drivers/staging/r8188eu/core/rtw_xmit.c @@ -448,14 +448,12 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p _rtw_pktfile_read(&pktfile, &tmp[0], 24); pattrib->dhcp_pkt = 0; if (pktfile.pkt_len > 282) {/* MINIMUM_DHCP_PACKET_SIZE) { */ - if (ETH_P_IP == pattrib->ether_type) {/* IP header */ - if (((tmp[21] == 68) && (tmp[23] == 67)) || - ((tmp[21] == 67) && (tmp[23] == 68))) { - /* 68 : UDP BOOTP client */ - /* 67 : UDP BOOTP server */ - /* Use low rate to send DHCP packet. */ - pattrib->dhcp_pkt = 1; - } + if (((tmp[21] == 68) && (tmp[23] == 67)) || + ((tmp[21] == 67) && (tmp[23] == 68))) { + /* 68 : UDP BOOTP client */ + /* 67 : UDP BOOTP server */ + /* Use low rate to send DHCP packet. */ + pattrib->dhcp_pkt = 1; } } } -- 2.30.2
Powered by blists - more mailing lists