From patchwork Thu Apr 7 10:09:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 607334 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qgdcz3m2jz9t4h for ; Thu, 7 Apr 2016 20:10:11 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3qgdcz2y5ZzDqF7 for ; Thu, 7 Apr 2016 20:10:11 +1000 (AEST) X-Original-To: slof@lists.ozlabs.org Delivered-To: slof@lists.ozlabs.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3qgdcq6kdQzDq7p for ; Thu, 7 Apr 2016 20:10:03 +1000 (AEST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2D5F36438E; Thu, 7 Apr 2016 10:10:02 +0000 (UTC) Received: from thh440s.fritz.box (vpn1-6-254.ams2.redhat.com [10.36.6.254]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u37A9tex024003; Thu, 7 Apr 2016 06:10:00 -0400 From: Thomas Huth To: slof@lists.ozlabs.org Date: Thu, 7 Apr 2016 12:09:55 +0200 Message-Id: <1460023795-27136-4-git-send-email-thuth@redhat.com> In-Reply-To: <1460023795-27136-1-git-send-email-thuth@redhat.com> References: <1460023795-27136-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 07 Apr 2016 10:10:02 +0000 (UTC) Subject: [SLOF] [PATCH 3/3] ipv6: Indent code with tabs, not with spaces X-BeenThere: slof@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Patches for https://github.com/aik/SLOF" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: slof-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "SLOF" Some parts of the IPv6 code are still indented with spaces. Let's use tabs instead as mandated by the SLOF coding conventions. Signed-off-by: Thomas Huth Reviewed-by: Nikunj A Dadhania --- clients/net-snk/app/netlib/dns.c | 7 +++---- clients/net-snk/app/netlib/icmpv6.c | 5 ++--- clients/net-snk/app/netlib/ipv6.c | 12 ++++++------ clients/net-snk/app/netlib/udp.c | 6 +++--- 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/clients/net-snk/app/netlib/dns.c b/clients/net-snk/app/netlib/dns.c index a5a36a1..a7313a9 100644 --- a/clients/net-snk/app/netlib/dns.c +++ b/clients/net-snk/app/netlib/dns.c @@ -278,10 +278,9 @@ handle_dns(uint8_t * packet, int32_t packetsize) return -1; } break; - case DNS_QTYPE_AAAA : - memcpy(dns_result_ipv6, (resp_section + 10), 16); - return 0; // IP successfully obtained - break; + case DNS_QTYPE_AAAA : + memcpy(dns_result_ipv6, (resp_section + 10), 16); + return 0; // IP successfully obtained } } // continue with next record in answer section diff --git a/clients/net-snk/app/netlib/icmpv6.c b/clients/net-snk/app/netlib/icmpv6.c index ad3f994..51e4a5f 100644 --- a/clients/net-snk/app/netlib/icmpv6.c +++ b/clients/net-snk/app/netlib/icmpv6.c @@ -317,9 +317,8 @@ handle_na (int fd, uint8_t *packet) ip6_addr_t ip; headers.ethh = (struct ethhdr *) packet; - headers.ip6h = (struct ip6hdr *) ((unsigned char *) headers.ethh + - sizeof(struct ethhdr)); - headers.icmp6h = (struct icmp6hdr *) (packet + + headers.ip6h = (struct ip6hdr *) (packet + sizeof(struct ethhdr)); + headers.icmp6h = (struct icmp6hdr *) (packet + sizeof(struct ethhdr) + sizeof(struct ip6hdr)); diff --git a/clients/net-snk/app/netlib/ipv6.c b/clients/net-snk/app/netlib/ipv6.c index 00912ca..dfa16b3 100644 --- a/clients/net-snk/app/netlib/ipv6.c +++ b/clients/net-snk/app/netlib/ipv6.c @@ -331,13 +331,13 @@ int8_t ip6addr_add(struct ip6addr_list_entry *new_address) ip6addr_add (solicited_node); } - if (NULL == first_ip6) - first_ip6 = new_address; - last_ip6->next = new_address; - last_ip6 = new_address; - last_ip6->next = NULL; + if (first_ip6 == NULL) + first_ip6 = new_address; + last_ip6->next = new_address; + last_ip6 = new_address; + last_ip6->next = NULL; - return 1; /* no error */ + return 1; /* no error */ } /** diff --git a/clients/net-snk/app/netlib/udp.c b/clients/net-snk/app/netlib/udp.c index 5d16e52..1203947 100644 --- a/clients/net-snk/app/netlib/udp.c +++ b/clients/net-snk/app/netlib/udp.c @@ -78,9 +78,9 @@ int8_t handle_udp(int fd, uint8_t * udp_packet, uint32_t packetsize) packetsize - sizeof(struct udphdr)); else return -1; - case UDPPORT_DHCPV6C: - return handle_dhcpv6(udp_packet+sizeof(struct udphdr), - packetsize - sizeof(struct udphdr)); + case UDPPORT_DHCPV6C: + return handle_dhcpv6(udp_packet+sizeof(struct udphdr), + packetsize - sizeof(struct udphdr)); case UDPPORT_TFTPC: #ifdef USE_MTFTP return handle_tftp(fd, udp_packet + sizeof(struct udphdr),