aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-03-02 22:54:56 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-03 17:01:38 -0500
commitafc130dd3902942c3cae55512b120b7e1df29239 (patch)
tree1c500b0b4ca497535e038f2a50ca6341b4ec3d79
parent211b85349ced1cf573ba0ec376038d8ec76885fb (diff)
ethernet: Use eth_<foo>_addr instead of memset
Use the built-in function instead of memset. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ethernet/eth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 8dbdf6c910b7..f3bad41d725f 100644
--- 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,
104 */ 104 */
105 105
106 if (dev->flags & (IFF_LOOPBACK | IFF_NOARP)) { 106 if (dev->flags & (IFF_LOOPBACK | IFF_NOARP)) {
107 memset(eth->h_dest, 0, ETH_ALEN); 107 eth_zero_addr(eth->h_dest);
108 return ETH_HLEN; 108 return ETH_HLEN;
109 } 109 }
110 110
@@ -357,7 +357,7 @@ void ether_setup(struct net_device *dev)
357 dev->flags = IFF_BROADCAST|IFF_MULTICAST; 357 dev->flags = IFF_BROADCAST|IFF_MULTICAST;
358 dev->priv_flags |= IFF_TX_SKB_SHARING; 358 dev->priv_flags |= IFF_TX_SKB_SHARING;
359 359
360 memset(dev->broadcast, 0xFF, ETH_ALEN); 360 eth_broadcast_addr(dev->broadcast);
361 361
362} 362}
363EXPORT_SYMBOL(ether_setup); 363EXPORT_SYMBOL(ether_setup);