Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet Style, no functional change.
details: https://anonhg.NetBSD.org/src/rev/abc27689381d
branches: trunk
changeset: 359238:abc27689381d
user: maxv <maxv%NetBSD.org@localhost>
date: Mon Feb 05 13:04:56 2018 +0000
description:
Style, no functional change.
diffstat:
sys/netinet/ip_input.c | 30 ++++++++++++++----------------
1 files changed, 14 insertions(+), 16 deletions(-)
diffs (104 lines):
diff -r f5644a9cec97 -r abc27689381d sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c Mon Feb 05 12:13:54 2018 +0000
+++ b/sys/netinet/ip_input.c Mon Feb 05 13:04:56 2018 +0000
@@ -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 @@
*/
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 @@
}
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 @@
}
/*
- * 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 @@
* 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 @@
}
/*
* 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 @@
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 @@
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;
Home |
Main Index |
Thread Index |
Old Index