aboutsummaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2016-04-07 12:09:55 +0200
committerAlexey Kardashevskiy <aik@ozlabs.ru>2016-04-12 13:47:48 +1000
commit640773c13004187e3b89d7e88be44f97767eced3 (patch)
tree847fcb0de9d2ee1a251a0da0350b41223cc46bc9 /clients
parent02facda6a5078b2f28a14d4a18f9f1182dd5e128 (diff)
downloadSLOF-640773c13004187e3b89d7e88be44f97767eced3.zip
SLOF-640773c13004187e3b89d7e88be44f97767eced3.tar.gz
SLOF-640773c13004187e3b89d7e88be44f97767eced3.tar.bz2
ipv6: Indent code with tabs, not with spaces
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 <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'clients')
-rw-r--r--clients/net-snk/app/netlib/dns.c7
-rw-r--r--clients/net-snk/app/netlib/icmpv6.c5
-rw-r--r--clients/net-snk/app/netlib/ipv6.c12
-rw-r--r--clients/net-snk/app/netlib/udp.c6
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),