diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-01-31 17:27:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-01-31 17:27:04 +0000 |
commit | 2bccdd51809becfe909c271f5fef4d380c663209 (patch) | |
tree | aacc10d49e4da03a38127fb2e1c1743cf612a734 /sys | |
parent | ed445cc242f54511cc5eb7452ddae8f119606cc5 (diff) |
KNF
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_icmp.c | 13 | ||||
-rw-r--r-- | sys/netinet/ip_ipip.c | 4 | ||||
-rw-r--r-- | sys/netinet/ip_output.c | 4 |
3 files changed, 10 insertions, 11 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 00c9e34d1c9..84acb202ccf 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.54 2003/01/31 17:23:34 henning Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.55 2003/01/31 17:27:03 deraadt Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -340,7 +340,7 @@ icmp_input(struct mbuf *m, ...) goto freeit; } i = hlen + min(icmplen, ICMP_ADVLENMIN); - if (m->m_len < i && (m = m_pullup(m, i)) == NULL) { + if (m->m_len < i && (m = m_pullup(m, i)) == NULL) { icmpstat.icps_tooshort++; return; } @@ -668,11 +668,10 @@ icmp_reflect(m) dst->sin_addr = t; rtalloc(&ro); - if (ro.ro_rt == 0) - { - ipstat.ips_noroute++; - m_freem(m); - goto done; + if (ro.ro_rt == 0) { + ipstat.ips_noroute++; + m_freem(m); + goto done; } ia = ifatoia(ro.ro_rt->rt_ifa); diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c index 44d9494d9bc..41ddce52389 100644 --- a/sys/netinet/ip_ipip.c +++ b/sys/netinet/ip_ipip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipip.c,v 1.27 2002/07/05 23:12:19 angelos Exp $ */ +/* $OpenBSD: ip_ipip.c,v 1.28 2003/01/31 17:27:03 deraadt Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -214,7 +214,7 @@ ipip_input(struct mbuf *m, int iphlen, struct ifnet *gifp) m_adj(m, iphlen); /* Sanity check */ - if (m->m_pkthdr.len < sizeof(struct ip)) { + if (m->m_pkthdr.len < sizeof(struct ip)) { ipipstat.ipips_hdrops++; m_freem(m); return; diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index c0c6309c283..8b301e59d5b 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.150 2002/10/10 17:27:40 dhartmei Exp $ */ +/* $OpenBSD: ip_output.c,v 1.151 2003/01/31 17:27:03 deraadt Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -443,7 +443,7 @@ ip_output(struct mbuf *m0, ...) if ((((m->m_flags & M_MCAST) && (ifp->if_flags & IFF_MULTICAST) == 0) || ((m->m_flags & M_BCAST) && - (ifp->if_flags & IFF_BROADCAST) == 0)) && (sproto == 0)) { + (ifp->if_flags & IFF_BROADCAST) == 0)) && (sproto == 0)) { ipstat.ips_noroute++; error = ENETUNREACH; goto bad; |