提交 afc130dd 编写于 作者: J Joe Perches 提交者: David S. Miller

ethernet: Use eth_<foo>_addr instead of memset

Use the built-in function instead of memset.
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 211b8534
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册