From 0d125074ebc8c971e939f8c2c8f90a80fa09aeb4 Mon Sep 17 00:00:00 2001 From: Antonio Quartulli Date: Sat, 18 Feb 2012 11:27:34 +0100 Subject: batman-adv: use ETH_HLEN instead of sizeof(struct ethhdr) Instead of using sizeof(struct ethhdr) it is strongly recommended to use the kernel macro ETH_HLEN. This patch substitute each occurrence of the former expressione with the latter one. Signed-off-by: Antonio Quartulli --- net/batman-adv/hard-interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/batman-adv/hard-interface.c') diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index e8c5da379a80..47c79d724ba3 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -574,8 +574,7 @@ static int batman_skb_recv(struct sk_buff *skb, struct net_device *dev, goto err_free; /* expect a valid ethernet header here. */ - if (unlikely(skb->mac_len != sizeof(struct ethhdr) || - !skb_mac_header(skb))) + if (unlikely(skb->mac_len != ETH_HLEN || !skb_mac_header(skb))) goto err_free; if (!hard_iface->soft_iface) -- cgit v1.2.3