[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1334951137-21268-1-git-send-email-Larry.Finger@lwfinger.net>
Date: Fri, 20 Apr 2012 14:45:37 -0500
From: Larry Finger <Larry.Finger@...inger.net>
To: gregkh@...uxfoundation.org
Cc: Larry Finger <Larry.Finger@...inger.net>,
linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
dan.carpenter@...cle.com
Subject: [PATCHi V2] staging: r8192e_pci: Change memcpy to memcmp
Routine rtllib_MlmeDisassociateRequest() has a comparison of memcpy()
with NULL, which makes no sense. Analysis of the code suggests that
memcmp() was intended.
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Larry Finger <Larry.Finger@...inger.net>
---
V2 - Fix compiler warning
---
Greg,
This routine has never been entered in all my testing of this driver,
thus this patch has no particular priority.
Thanks,
Larry
---
drivers/staging/rtl8192e/rtllib_softmac.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index c5a15db..703fa84 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -3679,8 +3679,7 @@ void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib, u8 *asSta,
RemovePeerTS(rtllib, asSta);
-
- if (memcpy(rtllib->current_network.bssid, asSta, 6) == NULL) {
+ if (memcmp(rtllib->current_network.bssid, asSta, 6) == 0) {
rtllib->state = RTLLIB_NOLINK;
for (i = 0; i < 6; i++)
--
1.7.10.130.g36e6c
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists