Skip to content

Commit

Permalink
ethernet: Use eth_<foo>_addr instead of memset
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and David S. Miller committed Mar 3, 2015
1 parent 211b853 commit afc130d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ethernet/eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit afc130d

Please sign in to comment.