projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
211b853
)
ethernet: Use eth_<foo>_addr instead of memset
author
Joe Perches
<
[email protected]
>
Tue, 3 Mar 2015 03:54:56 +0000
(19:54 -0800)
committer
David S. Miller
<
[email protected]
>
Tue, 3 Mar 2015 22:01:38 +0000
(17:01 -0500)
Use the built-in function instead of memset.
Signed-off-by: Joe Perches <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ethernet/eth.c
patch
|
blob
|
history
diff --git
a/net/ethernet/eth.c
b/net/ethernet/eth.c
index 8dbdf6c910b7e5ba44827000e70e6bf15e97a1ce..f3bad41d725f449f91d0b1b4f7119a9c9660e976 100644
(file)
--- a/
net/ethernet/eth.c
+++ b/
net/ethernet/eth.c
@@
-104,7
+104,7
@@
int eth_header(struct sk_buff *skb, struct net_device *dev,
*/
if (dev->flags & (IFF_LOOPBACK | IFF_NOARP)) {
-
memset(eth->h_dest, 0, ETH_ALEN
);
+
eth_zero_addr(eth->h_dest
);
return ETH_HLEN;
}
@@
-357,7
+357,7
@@
void ether_setup(struct net_device *dev)
dev->flags = IFF_BROADCAST|IFF_MULTICAST;
dev->priv_flags |= IFF_TX_SKB_SHARING;
-
memset(dev->broadcast, 0xFF, ETH_ALEN
);
+
eth_broadcast_addr(dev->broadcast
);
}
EXPORT_SYMBOL(ether_setup);