From patchwork Wed Feb 26 13:10:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 3883 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=178.209.62.157; helo=s3.neomailbox.net; envelope-from=antonio@meshcoding.com; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from s3.neomailbox.net (s3.neomailbox.net [178.209.62.157]) by open-mesh.org (Postfix) with ESMTPS id E90FB60168A for ; Wed, 26 Feb 2014 14:12:19 +0100 (CET) From: Antonio Quartulli To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 26 Feb 2014 14:10:42 +0100 Message-Id: <1393420242-1698-1-git-send-email-antonio@meshcoding.com> Cc: Antonio Quartulli Subject: [B.A.T.M.A.N.] [PATCHv3] batman-adv: use the proper location in ether_addr_copy() 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: Wed, 26 Feb 2014 13:12:20 -0000 Introduced by: 513b2d107a4d88f62b9394926e377d2c6250775f ("batman-adv: prefer ether_addr_copy to memcpy") Reported-by: kbuild test robot Signed-off-by: Antonio Quartulli --- Changes from v2: - added another fix in routing.c Changes from v1: - added Reported-by clause icmp_socket.c | 2 +- routing.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/icmp_socket.c b/icmp_socket.c index bf07dfd..161ef8f 100644 --- a/icmp_socket.c +++ b/icmp_socket.c @@ -230,7 +230,7 @@ static ssize_t batadv_socket_write(struct file *file, const char __user *buff, icmp_packet_rr = (struct batadv_icmp_packet_rr *)icmp_header; if (packet_len == sizeof(*icmp_packet_rr)) { addr = neigh_node->if_incoming->net_dev->dev_addr; - ether_addr_copy(icmp_packet_rr->rr, addr); + ether_addr_copy(icmp_packet_rr->rr[0], addr); } break; diff --git a/routing.c b/routing.c index 3855132..3514153 100644 --- a/routing.c +++ b/routing.c @@ -340,7 +340,7 @@ int batadv_recv_icmp_packet(struct sk_buff *skb, if (icmp_packet_rr->rr_cur >= BATADV_RR_LEN) goto out; - ether_addr_copy(&(icmp_packet_rr->rr[icmp_packet_rr->rr_cur]), + ether_addr_copy(icmp_packet_rr->rr[icmp_packet_rr->rr_cur], ethhdr->h_dest); icmp_packet_rr->rr_cur++; }