aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Finger <[email protected]>2012-04-20 14:45:37 -0500
committerGreg Kroah-Hartman <[email protected]>2012-04-20 15:12:12 -0700
commitea9f10f2fd207bb70a730ee3b356f75bc00ff41d (patch)
tree596f5b722bce64c01164f0107fbd8b18b5d104fa
parentef2353d26bdc44c78713da1a6eb2325ba9dac6f7 (diff)
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 <[email protected]> Signed-off-by: Larry Finger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/rtl8192e/rtllib_softmac.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index c5a15dba1bf5..ec98ed715beb 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++)