diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-04-20 15:45:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-20 18:12:12 -0400 |
commit | ea9f10f2fd207bb70a730ee3b356f75bc00ff41d (patch) | |
tree | 596f5b722bce64c01164f0107fbd8b18b5d104fa | |
parent | ef2353d26bdc44c78713da1a6eb2325ba9dac6f7 (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 <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 3 |
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, | |||
3679 | 3679 | ||
3680 | RemovePeerTS(rtllib, asSta); | 3680 | RemovePeerTS(rtllib, asSta); |
3681 | 3681 | ||
3682 | 3682 | if (memcmp(rtllib->current_network.bssid, asSta, 6) == 0) { | |
3683 | if (memcpy(rtllib->current_network.bssid, asSta, 6) == NULL) { | ||
3684 | rtllib->state = RTLLIB_NOLINK; | 3683 | rtllib->state = RTLLIB_NOLINK; |
3685 | 3684 | ||
3686 | for (i = 0; i < 6; i++) | 3685 | for (i = 0; i < 6; i++) |