Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet KNF
details: https://anonhg.NetBSD.org/src/rev/8fb9415fc62e
branches: trunk
changeset: 337701:8fb9415fc62e
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Fri Apr 24 00:48:47 2015 +0000
description:
KNF
diffstat:
sys/netinet/ip_output.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diffs (89 lines):
diff -r 4aba826f0846 -r 8fb9415fc62e sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c Fri Apr 24 00:42:56 2015 +0000
+++ b/sys/netinet/ip_output.c Fri Apr 24 00:48:47 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_output.c,v 1.236 2015/04/03 07:55:18 ozaki-r Exp $ */
+/* $NetBSD: ip_output.c,v 1.237 2015/04/24 00:48:47 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.236 2015/04/03 07:55:18 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.237 2015/04/24 00:48:47 ozaki-r Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -296,7 +296,7 @@
bool inmgroup;
m->m_flags |= (ip->ip_dst.s_addr == INADDR_BROADCAST) ?
- M_BCAST : M_MCAST;
+ M_BCAST : M_MCAST;
/*
* See if the caller provided any multicast options
*/
@@ -744,8 +744,8 @@
m0->m_pkthdr.csum_flags & M_CSUM_IPv4;
m->m_pkthdr.csum_data |= mhlen << 16;
KASSERT(!(ifp != NULL &&
- IN_NEED_CHECKSUM(ifp, M_CSUM_IPv4))
- || (m->m_pkthdr.csum_flags & M_CSUM_IPv4) != 0);
+ IN_NEED_CHECKSUM(ifp, M_CSUM_IPv4)) ||
+ (m->m_pkthdr.csum_flags & M_CSUM_IPv4) != 0);
}
IP_STATINC(IP_STAT_OFRAGMENTS);
fragments++;
@@ -767,10 +767,10 @@
/*
* checksum is hw-offloaded or not necessary.
*/
- KASSERT(!(ifp != NULL && IN_NEED_CHECKSUM(ifp, M_CSUM_IPv4))
- || (m->m_pkthdr.csum_flags & M_CSUM_IPv4) != 0);
+ KASSERT(!(ifp != NULL && IN_NEED_CHECKSUM(ifp, M_CSUM_IPv4)) ||
+ (m->m_pkthdr.csum_flags & M_CSUM_IPv4) != 0);
KASSERT(M_CSUM_DATA_IPv4_IPHL(m->m_pkthdr.csum_data) >=
- sizeof(struct ip));
+ sizeof(struct ip));
}
sendorfree:
/*
@@ -1512,7 +1512,7 @@
for (i = 0; i < imo->imo_num_memberships; ++i) {
if ((ifp == NULL ||
imo->imo_membership[i]->inm_ifp == ifp) &&
- in_hosteq(imo->imo_membership[i]->inm_addr, ia))
+ in_hosteq(imo->imo_membership[i]->inm_addr, ia))
break;
}
if (i == imo->imo_num_memberships)
@@ -1665,14 +1665,14 @@
case IP_MULTICAST_TTL:
optval = imo ? imo->imo_multicast_ttl
- : IP_DEFAULT_MULTICAST_TTL;
+ : IP_DEFAULT_MULTICAST_TTL;
error = sockopt_set(sopt, &optval, sizeof(optval));
break;
case IP_MULTICAST_LOOP:
optval = imo ? imo->imo_multicast_loop
- : IP_DEFAULT_MULTICAST_LOOP;
+ : IP_DEFAULT_MULTICAST_LOOP;
error = sockopt_set(sopt, &optval, sizeof(optval));
break;
@@ -1712,8 +1712,8 @@
struct mbuf *copym;
copym = m_copypacket(m, M_DONTWAIT);
- if (copym != NULL
- && (copym->m_flags & M_EXT || copym->m_len < sizeof(struct ip)))
+ if (copym != NULL &&
+ (copym->m_flags & M_EXT || copym->m_len < sizeof(struct ip)))
copym = m_pullup(copym, sizeof(struct ip));
if (copym == NULL)
return;
Home |
Main Index |
Thread Index |
Old Index