[SLOF] [PATCH 3/3] ipv6: Indent code with tabs, not with spaces

Thomas Huth thuth at redhat.com
Thu Apr 7 20:09:55 AEST 2016


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 at redhat.com>
---
 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),
-- 
1.8.3.1



More information about the SLOF mailing list