mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 05:04:00 +08:00
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>
This commit is contained in:
parent
ef2353d26b
commit
ea9f10f2fd
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user