]> asedeno.scripts.mit.edu Git - linux.git/commit
Staging: rtl8192u: Replace memset with eth_broadcast_addr
authorBhumika Goyal <bhumirks@gmail.com>
Tue, 1 Mar 2016 18:48:31 +0000 (00:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
commitf80c1d57637800f3da8eece0859d1e942a119ea8
treecf662fc578fa0b73d9b8a50dded0abd084a62f5b
parent7288cadc199ebeb1e34237f999efa1368e4a3daf
Staging: rtl8192u: Replace memset with eth_broadcast_addr

Use eth_broadcast_addr to assign the broadcast address to the given
address array instead of memset when the second argument is a broacast
address 0xff. ETH_ALEN is a macro with value 6, so 6 is treated as
ETH_ALEN if it is the third argument of memset.

Done using coccinelle.
@@
expression e;
@@
- memset(e,\(0xff\|0xFF\|255\),\(ETH_ALEN\|6\));
+ eth_broadcast_addr(e);

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c