From patchwork Mon Feb 17 22:12:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 3852 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=212.227.17.12; helo=mout.web.de; envelope-from=linus.luessing@web.de; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from mout.web.de (mout.web.de [212.227.17.12]) by open-mesh.org (Postfix) with ESMTPS id 9C086602225 for ; Mon, 17 Feb 2014 23:11:57 +0100 (CET) Received: from localhost ([95.211.148.154]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0MZlZK-1WZwBB2ZeY-00LV6K for ; Mon, 17 Feb 2014 23:11:56 +0100 From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Mon, 17 Feb 2014 23:12:35 +0100 Message-Id: <1392675155-26954-1-git-send-email-linus.luessing@web.de> X-Mailer: git-send-email 1.9.0.rc3 MIME-Version: 1.0 X-Provags-ID: V03:K0:lJ4cMauSIJEcdcTyCfwl15x5OM9gjzZkx75+lnyY8ASgS1FHF7U Igm+kS6a/zPcDDfoibR4cakcNoMA0AXTnDD0KYBmKmxWgKYTX6uWAAr87I8pJvSB9vcg1MA UbvYVyYgYEDNyJelm/T66xH7KmNYYVE6oU7+8FdkL9DK1vh5m0+/psetyaFMNk3baWZxssX RAcscA0wAY7SLkMciAGhg== Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: use ether_addr_copy instead of memcpy in multicast code X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Feb 2014 22:11:57 -0000 ether_addr_copy is supposed to be slightly more efficient for copying mac addresses, so let's use it. This makes recent versions of checkpatch happy, too. Reported-by: Antonio Quartulli Signed-off-by: Linus Lüssing --- multicast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multicast.c b/multicast.c index 00bb30e..e69143b 100644 --- a/multicast.c +++ b/multicast.c @@ -45,7 +45,7 @@ static int batadv_mcast_mla_softif_get(struct net_device *dev, break; } - memcpy(&new->addr, &mc_list_entry->addr, ETH_ALEN); + ether_addr_copy(&new->addr, &mc_list_entry->addr); hlist_add_head(&new->list, mcast_list); ret++; }