From: Fengguang Wu Date: Mon, 6 Jan 2014 16:09:46 +0000 (+0100) Subject: batman-adv: fix coccinelle warnings X-Git-Tag: firefly_0821_release~176^2~4167^2~107^2~15 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=abae9479ca9fa5616ae0debfbda54bf5424001df;p=firefly-linux-kernel-4.4.55.git batman-adv: fix coccinelle warnings net/batman-adv/network-coding.c:1535:1-7: Replace memcpy with struct assignment Generated by: coccinelle/misc/memcpy-assign.cocci Signed-off-by: Fengguang Wu Signed-off-by: Martin Hundebøll Signed-off-by: Marek Lindner Signed-off-by: Antonio Quartulli --- diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c index f1b604d88dc3..801ece699d7f 100644 --- a/net/batman-adv/network-coding.c +++ b/net/batman-adv/network-coding.c @@ -1636,7 +1636,7 @@ batadv_nc_skb_decode_packet(struct batadv_priv *bat_priv, struct sk_buff *skb, /* Reconstruct original mac header */ ethhdr = eth_hdr(skb); - memcpy(ethhdr, ðhdr_tmp, sizeof(*ethhdr)); + *ethhdr = ethhdr_tmp; /* Select the correct unicast header information based on the location * of our mac address in the coded_packet header