mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 15:34:48 +08:00
Staging: rtl8192e: Replace memset with eth_zero_addr
Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. Note that the 6 in the third argument of memset appears to represent an ethernet address size (ETH_ALEN). The Coccinelle semantic patch that makes this change is as follows: // <smpl> @eth_zero_addr@ expression e; @@ -memset(e,0x00,6); +eth_zero_addr(e); // </smpl> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6957248f48
commit
3e3148c511
@ -113,7 +113,7 @@ static void TsAddBaProcess(unsigned long data)
|
||||
|
||||
static void ResetTsCommonInfo(struct ts_common_info *pTsCommonInfo)
|
||||
{
|
||||
memset(pTsCommonInfo->Addr, 0, 6);
|
||||
eth_zero_addr(pTsCommonInfo->Addr);
|
||||
memset(&pTsCommonInfo->TSpec, 0, sizeof(union tspec_body));
|
||||
memset(&pTsCommonInfo->TClass, 0, sizeof(union qos_tclas)*TCLAS_NUM);
|
||||
pTsCommonInfo->TClasProc = 0;
|
||||
|
@ -3086,7 +3086,7 @@ static int rtllib_wpa_enable(struct rtllib_device *ieee, int value)
|
||||
*/
|
||||
netdev_info(ieee->dev, "%s WPA\n", value ? "enabling" : "disabling");
|
||||
ieee->wpa_enabled = value;
|
||||
memset(ieee->ap_mac_addr, 0, 6);
|
||||
eth_zero_addr(ieee->ap_mac_addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user