Module Name:    src
Committed By:   maxv
Date:           Mon Feb  5 13:04:56 UTC 2018

Modified Files:
        src/sys/netinet: ip_input.c

Log Message:
Style, no functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.364 -r1.365 src/sys/netinet/ip_input.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/ip_input.c
diff -u src/sys/netinet/ip_input.c:1.364 src/sys/netinet/ip_input.c:1.365
--- src/sys/netinet/ip_input.c:1.364	Mon Jan  1 00:51:36 2018
+++ src/sys/netinet/ip_input.c	Mon Feb  5 13:04:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_input.c,v 1.364 2018/01/01 00:51:36 christos Exp $	*/
+/*	$NetBSD: ip_input.c,v 1.365 2018/02/05 13:04:56 maxv Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  */
 
-/*-
+/*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.364 2018/01/01 00:51:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.365 2018/02/05 13:04:56 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -482,13 +482,13 @@ ip_input(struct mbuf *m)
 	 */
 	if (IP_HDR_ALIGNED_P(mtod(m, void *)) == 0) {
 		if ((m = m_copyup(m, sizeof(struct ip),
-				  (max_linkhdr + 3) & ~3)) == NULL) {
+		    (max_linkhdr + 3) & ~3)) == NULL) {
 			/* XXXJRT new stat, please */
 			IP_STATINC(IP_STAT_TOOSMALL);
 			goto out;
 		}
-	} else if (__predict_false(m->m_len < sizeof (struct ip))) {
-		if ((m = m_pullup(m, sizeof (struct ip))) == NULL) {
+	} else if (__predict_false(m->m_len < sizeof(struct ip))) {
+		if ((m = m_pullup(m, sizeof(struct ip))) == NULL) {
 			IP_STATINC(IP_STAT_TOOSMALL);
 			goto out;
 		}
@@ -530,8 +530,7 @@ ip_input(struct mbuf *m)
 	}
 
 	switch (m->m_pkthdr.csum_flags &
-		((ifp->if_csum_flags_rx & M_CSUM_IPv4) |
-		 M_CSUM_IPv4_BAD)) {
+		((ifp->if_csum_flags_rx & M_CSUM_IPv4) | M_CSUM_IPv4_BAD)) {
 	case M_CSUM_IPv4|M_CSUM_IPv4_BAD:
 		INET_CSUM_COUNTER_INCR(&ip_hwcsum_bad);
 		IP_STATINC(IP_STAT_BADSUM);
@@ -570,10 +569,9 @@ ip_input(struct mbuf *m)
 	}
 
 	/*
-	 * Check that the amount of data in the buffers
-	 * is as at least much as the IP header would have us expect.
-	 * Trim mbufs if longer than we expect.
-	 * Drop packet if shorter than we expect.
+	 * Check that the amount of data in the buffers is at least as much
+	 * as the IP header would have us expect. Trim mbufs if longer than
+	 * we expect. Drop packet if shorter than we expect.
 	 */
 	if (m->m_pkthdr.len < len) {
 		IP_STATINC(IP_STAT_TOOSHORT);
@@ -654,7 +652,7 @@ ip_input(struct mbuf *m)
 	 * error was detected (causing an icmp message
 	 * to be sent and the original packet to be freed).
 	 */
-	if (hlen > sizeof (struct ip) && ip_dooptions(m)) {
+	if (hlen > sizeof(struct ip) && ip_dooptions(m)) {
 		m = NULL;
 		goto out;
 	}
@@ -788,7 +786,7 @@ ours:
 		}
 		/*
 		 * Reassembly is done, we have the final packet.
-		 * Updated cached data in local variable(s).
+		 * Update cached data in local variable(s).
 		 */
 		ip = mtod(m, struct ip *);
 		hlen = ip->ip_hl << 2;
@@ -885,7 +883,7 @@ ip_dooptions(struct mbuf *m)
 
 	dst = ip->ip_dst;
 	cp = (u_char *)(ip + 1);
-	cnt = (ip->ip_hl << 2) - sizeof (struct ip);
+	cnt = (ip->ip_hl << 2) - sizeof(struct ip);
 	for (; cnt > 0; cnt -= optlen, cp += optlen) {
 		opt = cp[IPOPT_OPTVAL];
 		if (opt == IPOPT_EOL)
@@ -1053,7 +1051,7 @@ ip_dooptions(struct mbuf *m)
 				code = (u_char *)&ipt->ipt_ptr - (u_char *)ip;
 				goto bad;
 			}
-			if (ipt->ipt_ptr > ipt->ipt_len - sizeof (int32_t)) {
+			if (ipt->ipt_ptr > ipt->ipt_len - sizeof(int32_t)) {
 				if (++ipt->ipt_oflw == 0) {
 					code = (u_char *)&ipt->ipt_ptr -
 					    (u_char *)ip;

Reply via email to