summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-09-11 03:15:37 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-09-11 03:15:37 +0000
commitdc9bd593149a320bd45ff97fdb845d025d1f490b (patch)
treee81c3f9b3a126e92f99164ba619ca6a3ac5f0a42 /sys
parentfa38af0572fab40ec124be8a99d172c2939b8e8b (diff)
KNF - return is not a function. sync w/kame
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/if_atm.c6
-rw-r--r--sys/netinet/in.c4
-rw-r--r--sys/netinet/in_pcb.c4
-rw-r--r--sys/netinet/tcp_usrreq.c4
-rw-r--r--sys/netinet6/frag6.c6
-rw-r--r--sys/netinet6/icmp6.c42
-rw-r--r--sys/netinet6/in6.c126
-rw-r--r--sys/netinet6/in6_ifattach.c10
-rw-r--r--sys/netinet6/in6_pcb.c18
-rw-r--r--sys/netinet6/in6_src.c40
-rw-r--r--sys/netinet6/ip6_input.c20
-rw-r--r--sys/netinet6/ip6_mroute.c26
-rw-r--r--sys/netinet6/ip6_output.c100
-rw-r--r--sys/netinet6/nd6.c60
-rw-r--r--sys/netinet6/nd6_rtr.c52
-rw-r--r--sys/netinet6/raw_ip6.c8
-rw-r--r--sys/netinet6/route6.c20
-rw-r--r--sys/netinet6/udp6_output.c4
18 files changed, 275 insertions, 275 deletions
diff --git a/sys/netinet/if_atm.c b/sys/netinet/if_atm.c
index 16f1936bbf8..8ff6b58e53a 100644
--- a/sys/netinet/if_atm.c
+++ b/sys/netinet/if_atm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atm.c,v 1.9 2002/06/09 16:26:10 itojun Exp $ */
+/* $OpenBSD: if_atm.c,v 1.10 2002/09/11 03:15:36 itojun Exp $ */
/*
*
@@ -266,7 +266,7 @@ register struct atm_pseudohdr *desten; /* OUT */
if (sdl->sdl_family == AF_LINK && sdl->sdl_alen == sizeof(*desten)) {
bcopy(LLADDR(sdl), desten, sdl->sdl_alen);
- return(1); /* ok, go for it! */
+ return (1); /* ok, go for it! */
}
/*
@@ -277,6 +277,6 @@ register struct atm_pseudohdr *desten; /* OUT */
bad:
m_freem(m);
- return(0);
+ return (0);
}
#endif /* INET */
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index 142848b69b2..e6c7492f8e8 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.c,v 1.28 2002/07/12 13:31:20 art Exp $ */
+/* $OpenBSD: in.c,v 1.29 2002/09/11 03:15:36 itojun Exp $ */
/* $NetBSD: in.c,v 1.26 1996/02/13 23:41:39 christos Exp $ */
/*
@@ -231,7 +231,7 @@ in_control(so, cmd, data, ifp)
case SIOCALIFADDR:
case SIOCDLIFADDR:
if ((so->so_state & SS_PRIV) == 0)
- return(EPERM);
+ return (EPERM);
/*fall through*/
case SIOCGLIFADDR:
if (!ifp)
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 863f8846c04..e53c42a7399 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.63 2002/06/11 05:13:59 art Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.64 2002/09/11 03:15:36 itojun Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -144,7 +144,7 @@ in_baddynamic(port, proto)
{
if (port < IPPORT_RESERVED/2 || port >= IPPORT_RESERVED)
- return(0);
+ return (0);
switch (proto) {
case IPPROTO_TCP:
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 3ea43a37c34..96792abdb5c 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.66 2002/08/08 19:18:13 provos Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.67 2002/09/11 03:15:36 itojun Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -814,7 +814,7 @@ tcp_ident(oldp, oldlenp, newp, newlen)
lin = (struct sockaddr_in *)&tir.laddr;
break;
default:
- return(EINVAL);
+ return (EINVAL);
}
s = splsoftnet();
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index dad99d4b7d6..b97d75270cb 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frag6.c,v 1.17 2002/06/08 21:51:08 itojun Exp $ */
+/* $OpenBSD: frag6.c,v 1.18 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */
/*
@@ -336,14 +336,14 @@ frag6_input(mp, offp, proto)
offset - sizeof(struct ip6_frag) +
offsetof(struct ip6_frag, ip6f_offlg));
IP6Q_UNLOCK();
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
} else if (fragoff + frgpartlen > IPV6_MAXPACKET) {
icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
offset - sizeof(struct ip6_frag) +
offsetof(struct ip6_frag, ip6f_offlg));
IP6Q_UNLOCK();
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
/*
* If it's the first fragment, do the above check for each
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 0da36e0ccf1..c9c41062f3b 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: icmp6.c,v 1.63 2002/07/30 23:30:08 itojun Exp $ */
+/* $OpenBSD: icmp6.c,v 1.64 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -889,7 +889,7 @@ icmp6_input(mp, offp, proto)
deliver:
if (icmp6_notify_error(m, off, icmp6len, code)) {
/* In this case, m should've been freed. */
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
break;
@@ -936,7 +936,7 @@ icmp6_notify_error(m, off, icmp6len, code)
sizeof(*icmp6) + sizeof(struct ip6_hdr));
if (icmp6 == NULL) {
icmp6stat.icp6s_tooshort++;
- return(-1);
+ return (-1);
}
#endif
eip6 = (struct ip6_hdr *)(icmp6 + 1);
@@ -973,7 +973,7 @@ icmp6_notify_error(m, off, icmp6len, code)
eoff, sizeof(*eh));
if (eh == NULL) {
icmp6stat.icp6s_tooshort++;
- return(-1);
+ return (-1);
}
#endif
@@ -1002,7 +1002,7 @@ icmp6_notify_error(m, off, icmp6len, code)
eoff, sizeof(*rth));
if (rth == NULL) {
icmp6stat.icp6s_tooshort++;
- return(-1);
+ return (-1);
}
#endif
rthlen = (rth->ip6r_len + 1) << 3;
@@ -1028,7 +1028,7 @@ icmp6_notify_error(m, off, icmp6len, code)
eoff, rthlen);
if (rth0 == NULL) {
icmp6stat.icp6s_tooshort++;
- return(-1);
+ return (-1);
}
#endif
/* just ignore a bogus header */
@@ -1051,7 +1051,7 @@ icmp6_notify_error(m, off, icmp6len, code)
eoff, sizeof(*fh));
if (fh == NULL) {
icmp6stat.icp6s_tooshort++;
- return(-1);
+ return (-1);
}
#endif
/*
@@ -1086,7 +1086,7 @@ icmp6_notify_error(m, off, icmp6len, code)
sizeof(*icmp6) + sizeof(struct ip6_hdr));
if (icmp6 == NULL) {
icmp6stat.icp6s_tooshort++;
- return(-1);
+ return (-1);
}
#endif
@@ -1154,11 +1154,11 @@ icmp6_notify_error(m, off, icmp6len, code)
&ip6cp);
}
}
- return(0);
+ return (0);
freeit:
m_freem(m);
- return(-1);
+ return (-1);
}
void
@@ -1447,7 +1447,7 @@ ni6_input(m, off)
MGETHDR(n, M_DONTWAIT, m->m_type);
if (n == NULL) {
m_freem(m);
- return(NULL);
+ return (NULL);
}
M_DUP_PKTHDR(n, m); /* just for rcvif */
if (replylen > MHLEN) {
@@ -1524,13 +1524,13 @@ ni6_input(m, off)
nni6->ni_type = ICMP6_NI_REPLY;
m_freem(m);
- return(n);
+ return (n);
bad:
m_freem(m);
if (n)
m_freem(n);
- return(NULL);
+ return (NULL);
}
#undef hostnamelen
@@ -1737,7 +1737,7 @@ ni6_addrs(ni6, m, ifpp, subj)
switch (ni6->ni_code) {
case ICMP6_NI_SUBJ_IPV6:
if (subj == NULL) /* must be impossible... */
- return(0);
+ return (0);
subj_ip6 = (struct sockaddr_in6 *)subj;
break;
default:
@@ -1745,7 +1745,7 @@ ni6_addrs(ni6, m, ifpp, subj)
* XXX: we only support IPv6 subject address for
* this Qtype.
*/
- return(0);
+ return (0);
}
}
@@ -1804,13 +1804,13 @@ ni6_addrs(ni6, m, ifpp, subj)
}
if (iffound) {
*ifpp = ifp;
- return(addrsofif);
+ return (addrsofif);
}
addrs += addrsofif;
}
- return(addrs);
+ return (addrs);
}
static int
@@ -1830,7 +1830,7 @@ ni6_store_addrs(ni6, nni6, ifp0, resid)
long time_second = time.tv_sec;
if (ifp0 == NULL && !(niflags & NI_NODEADDR_FLAG_ALL))
- return(0); /* needless to copy */
+ return (0); /* needless to copy */
again:
@@ -1895,7 +1895,7 @@ ni6_store_addrs(ni6, nni6, ifp0, resid)
*/
nni6->ni_flags |=
NI_NODEADDR_FLAG_TRUNCATE;
- return(copied);
+ return (copied);
}
/*
@@ -1951,7 +1951,7 @@ ni6_store_addrs(ni6, nni6, ifp0, resid)
goto again;
}
- return(copied);
+ return (copied);
}
/*
@@ -2831,7 +2831,7 @@ icmp6_ctloutput(op, so, level, optname, mp)
break;
}
- return(error);
+ return (error);
}
/* NRL PCB */
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 3255c428ced..b113aeb593a 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.46 2002/06/14 21:35:00 todd Exp $ */
+/* $OpenBSD: in6.c,v 1.47 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */
/*
@@ -333,10 +333,10 @@ in6_mask2len(mask, lim0)
*/
if (p < lim) {
if (y != 0 && (*p & (0x00ff >> y)) != 0)
- return(-1);
+ return (-1);
for (p = p + 1; p < lim; p++)
if (*p != 0)
- return(-1);
+ return (-1);
}
return x * 8 + y;
@@ -371,7 +371,7 @@ in6_control(so, cmd, data, ifp, p)
}
if (ifp == NULL)
- return(EOPNOTSUPP);
+ return (EOPNOTSUPP);
switch (cmd) {
case SIOCSNDFLUSH_IN6:
@@ -380,7 +380,7 @@ in6_control(so, cmd, data, ifp, p)
case SIOCSDEFIFACE_IN6:
case SIOCSIFINFO_FLAGS:
if (!privileged)
- return(EPERM);
+ return (EPERM);
/* FALLTHROUGH */
case OSIOCGIFINFO_IN6:
case SIOCGIFINFO_IN6:
@@ -388,7 +388,7 @@ in6_control(so, cmd, data, ifp, p)
case SIOCGPRLST_IN6:
case SIOCGNBRINFO_IN6:
case SIOCGDEFIFACE_IN6:
- return(nd6_ioctl(cmd, data, ifp));
+ return (nd6_ioctl(cmd, data, ifp));
}
switch (cmd) {
@@ -401,14 +401,14 @@ in6_control(so, cmd, data, ifp, p)
log(LOG_NOTICE,
"prefix ioctls are now invalidated. "
"please use ifconfig.\n");
- return(EOPNOTSUPP);
+ return (EOPNOTSUPP);
}
switch (cmd) {
case SIOCALIFADDR:
case SIOCDLIFADDR:
if (!privileged)
- return(EPERM);
+ return (EPERM);
/* FALLTHROUGH */
case SIOCGLIFADDR:
return in6_lifaddr_ioctl(so, cmd, data, ifp, p);
@@ -462,12 +462,12 @@ in6_control(so, cmd, data, ifp, p)
htons(ifp->if_index);
} else if (sa6->sin6_addr.s6_addr16[1] !=
htons(ifp->if_index)) {
- return(EINVAL); /* link ID contradicts */
+ return (EINVAL); /* link ID contradicts */
}
if (sa6->sin6_scope_id) {
if (sa6->sin6_scope_id !=
(u_int32_t)ifp->if_index)
- return(EINVAL);
+ return (EINVAL);
sa6->sin6_scope_id = 0; /* XXX: good way? */
}
}
@@ -483,7 +483,7 @@ in6_control(so, cmd, data, ifp, p)
* Since IPv6 allows a node to assign multiple addresses
* on a single interface, SIOCSIFxxx ioctls are deprecated.
*/
- return(EINVAL);
+ return (EINVAL);
case SIOCDIFADDR_IN6:
/*
@@ -494,7 +494,7 @@ in6_control(so, cmd, data, ifp, p)
* first one" semantics to be not preferable.
*/
if (ia == NULL)
- return(EADDRNOTAVAIL);
+ return (EADDRNOTAVAIL);
/* FALLTHROUGH */
case SIOCAIFADDR_IN6:
/*
@@ -503,9 +503,9 @@ in6_control(so, cmd, data, ifp, p)
*/
if (ifra->ifra_addr.sin6_family != AF_INET6 ||
ifra->ifra_addr.sin6_len != sizeof(struct sockaddr_in6))
- return(EAFNOSUPPORT);
+ return (EAFNOSUPPORT);
if (!privileged)
- return(EPERM);
+ return (EPERM);
break;
@@ -518,16 +518,16 @@ in6_control(so, cmd, data, ifp, p)
case SIOCGIFALIFETIME_IN6:
/* must think again about its semantics */
if (ia == NULL)
- return(EADDRNOTAVAIL);
+ return (EADDRNOTAVAIL);
break;
case SIOCSIFALIFETIME_IN6:
{
struct in6_addrlifetime *lt;
if (!privileged)
- return(EPERM);
+ return (EPERM);
if (ia == NULL)
- return(EADDRNOTAVAIL);
+ return (EADDRNOTAVAIL);
/* sanity for overflow - beware unsigned */
lt = &ifr->ifr_ifru.ifru_lifetime;
if (lt->ia6t_vltime != ND6_INFINITE_LIFETIME
@@ -550,7 +550,7 @@ in6_control(so, cmd, data, ifp, p)
case SIOCGIFDSTADDR_IN6:
if ((ifp->if_flags & IFF_POINTOPOINT) == 0)
- return(EINVAL);
+ return (EINVAL);
/*
* XXX: should we check if ifa_dstaddr is NULL and return
* an error?
@@ -649,7 +649,7 @@ in6_control(so, cmd, data, ifp, p)
* and link it to the list.
*/
if ((error = in6_update_ifa(ifp, ifra, ia)) != 0)
- return(error);
+ return (error);
if ((ia = in6ifa_ifpwithaddr(ifp, &ifra->ifra_addr.sin6_addr))
== NULL) {
/*
@@ -704,11 +704,11 @@ in6_control(so, cmd, data, ifp, p)
* interface route.
*/
if ((error = nd6_prelist_add(&pr0, NULL, &pr)) != 0)
- return(error);
+ return (error);
if (pr == NULL) {
log(LOG_ERR, "nd6_prelist_add succeeded but "
"no prefix\n");
- return(EINVAL); /* XXX panic here? */
+ return (EINVAL); /* XXX panic here? */
}
}
if ((ia->ia6_flags & IN6_IFF_AUTOCONF) &&
@@ -776,11 +776,11 @@ in6_control(so, cmd, data, ifp, p)
default:
if (ifp == NULL || ifp->if_ioctl == 0)
- return(EOPNOTSUPP);
- return((*ifp->if_ioctl)(ifp, cmd, data));
+ return (EOPNOTSUPP);
+ return ((*ifp->if_ioctl)(ifp, cmd, data));
}
- return(0);
+ return (0);
}
/*
@@ -805,7 +805,7 @@ in6_update_ifa(ifp, ifra, ia)
/* Validate parameters */
if (ifp == NULL || ifra == NULL) /* this maybe redundant */
- return(EINVAL);
+ return (EINVAL);
/*
* The destination address for a p2p link must have a family
@@ -814,13 +814,13 @@ in6_update_ifa(ifp, ifra, ia)
if ((ifp->if_flags & IFF_POINTOPOINT) != 0 &&
ifra->ifra_dstaddr.sin6_family != AF_INET6 &&
ifra->ifra_dstaddr.sin6_family != AF_UNSPEC)
- return(EAFNOSUPPORT);
+ return (EAFNOSUPPORT);
/*
* validate ifra_prefixmask. don't check sin6_family, netmask
* does not carry fields other than sin6_len.
*/
if (ifra->ifra_prefixmask.sin6_len > sizeof(struct sockaddr_in6))
- return(EINVAL);
+ return (EINVAL);
/*
* Because the IPv6 address architecture is classless, we require
* users to specify a (non 0) prefix length (mask) for a new address.
@@ -828,13 +828,13 @@ in6_update_ifa(ifp, ifra, ia)
* reject a non-consecutive mask.
*/
if (ia == NULL && ifra->ifra_prefixmask.sin6_len == 0)
- return(EINVAL);
+ return (EINVAL);
if (ifra->ifra_prefixmask.sin6_len != 0) {
plen = in6_mask2len(&ifra->ifra_prefixmask.sin6_addr,
(u_char *)&ifra->ifra_prefixmask +
ifra->ifra_prefixmask.sin6_len);
if (plen <= 0)
- return(EINVAL);
+ return (EINVAL);
} else {
/*
* In this case, ia must not be NULL. We just use its prefix
@@ -861,7 +861,7 @@ in6_update_ifa(ifp, ifra, ia)
htons(ifp->if_index);
} else if (dst6.sin6_addr.s6_addr16[1] !=
htons(ifp->if_index)) {
- return(EINVAL); /* ifid contradicts */
+ return (EINVAL); /* ifid contradicts */
}
}
}
@@ -879,7 +879,7 @@ in6_update_ifa(ifp, ifra, ia)
/* XXX: noisy message */
nd6log((LOG_INFO, "in6_update_ifa: a destination can be "
"specified for a p2p or a loopback IF only\n"));
- return(EINVAL);
+ return (EINVAL);
}
if (plen != 128) {
nd6log((LOG_INFO, "in6_update_ifa: prefixlen should be "
@@ -898,14 +898,14 @@ in6_update_ifa(ifp, ifra, ia)
0xffffffff;
plen = 128;
#else
- return(EINVAL);
+ return (EINVAL);
#endif
}
}
/* lifetime consistency check */
lt = &ifra->ifra_lifetime;
if (lt->ia6t_pltime > lt->ia6t_vltime)
- return(EINVAL);
+ return (EINVAL);
if (lt->ia6t_vltime == 0) {
/*
* the following log might be noisy, but this is a typical
@@ -916,7 +916,7 @@ in6_update_ifa(ifp, ifra, ia)
ip6_sprintf(&ifra->ifra_addr.sin6_addr)));
if (ia == NULL)
- return(0); /* there's nothing to do */
+ return (0); /* there's nothing to do */
}
/*
@@ -1220,7 +1220,7 @@ in6_update_ifa(ifp, ifra, ia)
nd6_dad_start((struct ifaddr *)ia, NULL);
}
- return(error);
+ return (error);
unlink:
/*
@@ -1229,7 +1229,7 @@ in6_update_ifa(ifp, ifra, ia)
*/
if (hostIsNew)
in6_unlink_ifa(ia, ifp);
- return(error);
+ return (error);
cleanup:
in6_purgeaddr(&ia->ia_ifa);
@@ -1631,7 +1631,7 @@ in6_ifinit(ifp, ia, sin6, newhost)
if (ifacount <= 1 && ifp->if_ioctl &&
(error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia))) {
splx(s);
- return(error);
+ return (error);
}
splx(s);
@@ -1649,7 +1649,7 @@ in6_ifinit(ifp, ia, sin6, newhost)
if (plen == 128 && ia->ia_dstaddr.sin6_family == AF_INET6) {
if ((error = rtinit(&(ia->ia_ifa), (int)RTM_ADD,
RTF_UP | RTF_HOST)) != 0)
- return(error);
+ return (error);
ia->ia_flags |= IFA_ROUTE;
}
@@ -1663,7 +1663,7 @@ in6_ifinit(ifp, ia, sin6, newhost)
if (ifp->if_flags & IFF_MULTICAST)
in6_restoremkludge(ia, ifp);
- return(error);
+ return (error);
}
/*
@@ -1822,7 +1822,7 @@ in6_addmulti(maddr6, ifp, errorp)
if (in6m == NULL) {
splx(s);
*errorp = ENOBUFS;
- return(NULL);
+ return (NULL);
}
in6m->in6m_addr = *maddr6;
in6m->in6m_ifp = ifp;
@@ -1832,7 +1832,7 @@ in6_addmulti(maddr6, ifp, errorp)
free(in6m, M_IPMADDR);
splx(s);
*errorp = EADDRNOTAVAIL; /* appropriate? */
- return(NULL);
+ return (NULL);
}
in6m->in6m_ia = ia;
ia->ia_ifa.ifa_refcnt++; /* gain a reference */
@@ -1856,7 +1856,7 @@ in6_addmulti(maddr6, ifp, errorp)
free(in6m, M_IPMADDR);
IFAFREE(&ia->ia_ifa);
splx(s);
- return(NULL);
+ return (NULL);
}
/*
* Let MLD6 know that we have joined a new IP6 multicast
@@ -1865,7 +1865,7 @@ in6_addmulti(maddr6, ifp, errorp)
mld6_start_listening(in6m);
}
splx(s);
- return(in6m);
+ return (in6m);
}
/*
@@ -1967,7 +1967,7 @@ in6ifa_ifpforlinklocal(ifp, ignoreflags)
}
}
- return((struct in6_ifaddr *)ifa);
+ return ((struct in6_ifaddr *)ifa);
}
@@ -1993,7 +1993,7 @@ in6ifa_ifpwithaddr(ifp, addr)
break;
}
- return((struct in6_ifaddr *)ifa);
+ return ((struct in6_ifaddr *)ifa);
}
/*
@@ -2047,7 +2047,7 @@ ip6_sprintf(addr)
a++;
}
*--cp = 0;
- return(ip6buf[ip6round]);
+ return (ip6buf[ip6round]);
}
/*
@@ -2118,17 +2118,17 @@ in6_addr2scopeid(ifp, addr)
switch(scope) {
case IPV6_ADDR_SCOPE_NODELOCAL:
- return(-1); /* XXX: is this an appropriate value? */
+ return (-1); /* XXX: is this an appropriate value? */
case IPV6_ADDR_SCOPE_LINKLOCAL:
/* XXX: we do not distinguish between a link and an I/F. */
- return(ifp->if_index);
+ return (ifp->if_index);
case IPV6_ADDR_SCOPE_SITELOCAL:
- return(0); /* XXX: invalid. */
+ return (0); /* XXX: invalid. */
default:
- return(0); /* XXX: treat as global. */
+ return (0); /* XXX: treat as global. */
}
}
@@ -2145,12 +2145,12 @@ in6_is_addr_deprecated(sa6)
ia->ia_addr.sin6_scope_id == sa6->sin6_scope_id &&
#endif
(ia->ia6_flags & IN6_IFF_DEPRECATED) != 0)
- return(1); /* true */
+ return (1); /* true */
/* XXX: do we still have to go thru the rest of the list? */
}
- return(0); /* false */
+ return (0); /* false */
}
/*
@@ -2188,19 +2188,19 @@ in6_are_prefix_equal(p1, p2, len)
if (0 > len || len > 128) {
log(LOG_ERR, "in6_are_prefix_equal: invalid prefix length(%d)\n",
len);
- return(0);
+ return (0);
}
bytelen = len / 8;
bitlen = len % 8;
if (bcmp(&p1->s6_addr, &p2->s6_addr, bytelen))
- return(0);
+ return (0);
if (p1->s6_addr[bytelen] >> (8 - bitlen) !=
p2->s6_addr[bytelen] >> (8 - bitlen))
- return(0);
+ return (0);
- return(1);
+ return (1);
}
void
@@ -2243,7 +2243,7 @@ in6_ifawithscope(oifp, dst)
if (oifp == NULL) {
printf("in6_ifawithscope: output interface is not specified\n");
- return(NULL);
+ return (NULL);
}
/*
@@ -2473,7 +2473,7 @@ in6_ifawithscope(oifp, dst)
ip6stat.ip6s_sources_deprecated[best_scope]++;
}
- return(ifa_best);
+ return (ifa_best);
}
/*
@@ -2533,7 +2533,7 @@ in6_ifawithifp(ifp, dst)
}
}
if (besta)
- return(besta);
+ return (besta);
for (ifa = ifp->if_addrlist.tqh_first;
ifa;
@@ -2599,7 +2599,7 @@ in6if_do_dad(ifp)
struct ifnet *ifp;
{
if ((ifp->if_flags & IFF_LOOPBACK) != 0)
- return(0);
+ return (0);
switch (ifp->if_type) {
case IFT_FAITH:
@@ -2609,7 +2609,7 @@ in6if_do_dad(ifp)
* interfaces. We should even omit it, because loop-backed
* NS would confuse the DAD procedure.
*/
- return(0);
+ return (0);
default:
/*
* Our DAD routine requires the interface up and running.
@@ -2622,9 +2622,9 @@ in6if_do_dad(ifp)
*/
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) !=
(IFF_UP|IFF_RUNNING))
- return(0);
+ return (0);
- return(1);
+ return (1);
}
}
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index b139260e19f..5319ebcdbb5 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_ifattach.c,v 1.29 2002/06/11 07:36:00 itojun Exp $ */
+/* $OpenBSD: in6_ifattach.c,v 1.30 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $ */
/*
@@ -351,7 +351,7 @@ in6_ifattach_linklocal(ifp, altifp)
if (get_ifid(ifp, altifp, &ifra.ifra_addr.sin6_addr) != 0) {
nd6log((LOG_ERR,
"%s: no ifid available\n", ifp->if_xname));
- return(-1);
+ return (-1);
}
}
@@ -391,7 +391,7 @@ in6_ifattach_linklocal(ifp, altifp)
"configure a link-local address on %s "
"(errno=%d)\n",
ifp->if_xname, error));
- return(-1);
+ return (-1);
}
/*
@@ -446,7 +446,7 @@ in6_ifattach_linklocal(ifp, altifp)
*/
if (nd6_prefix_lookup(&pr0) == NULL) {
if ((error = nd6_prelist_add(&pr0, NULL, NULL)) != 0)
- return(error);
+ return (error);
}
return 0;
@@ -498,7 +498,7 @@ in6_ifattach_loopback(ifp)
nd6log((LOG_ERR, "in6_ifattach_loopback: failed to configure "
"the loopback address on %s (errno=%d)\n",
ifp->if_xname, error));
- return(-1);
+ return (-1);
}
return 0;
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c
index ae69f5afe19..d207fb360f8 100644
--- a/sys/netinet6/in6_pcb.c
+++ b/sys/netinet6/in6_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_pcb.c,v 1.31 2002/09/04 07:26:53 itojun Exp $ */
+/* $OpenBSD: in6_pcb.c,v 1.32 2002/09/11 03:15:36 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -262,7 +262,7 @@ in6_pcbbind(inp, nam)
if (ia &&
((struct in6_ifaddr *)ia)->ia6_flags &
(IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|IN6_IFF_DETACHED))
- return(EADDRNOTAVAIL);
+ return (EADDRNOTAVAIL);
}
if (lport) {
struct inpcb *t;
@@ -440,11 +440,11 @@ in6_pcbconnect(inp, nam)
(void)&in6a; /* XXX fool gcc */
if (nam->m_len != sizeof(*sin6))
- return(EINVAL);
+ return (EINVAL);
if (sin6->sin6_family != AF_INET6)
- return(EAFNOSUPPORT);
+ return (EAFNOSUPPORT);
if (sin6->sin6_port == 0)
- return(EADDRNOTAVAIL);
+ return (EADDRNOTAVAIL);
/* reject IPv4 mapped address, we have no support for it */
if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
@@ -486,7 +486,7 @@ in6_pcbconnect(inp, nam)
if (sinp == 0) {
if (error == 0)
error = EADDRNOTAVAIL;
- return(error);
+ return (error);
}
bzero(&mapped, sizeof(mapped));
mapped.s6_addr16[5] = htons(0xffff);
@@ -504,7 +504,7 @@ in6_pcbconnect(inp, nam)
if (in6a == 0) {
if (error == 0)
error = EADDRNOTAVAIL;
- return(error);
+ return (error);
}
}
if (inp->inp_route6.ro_rt)
@@ -515,7 +515,7 @@ in6_pcbconnect(inp, nam)
if (in_pcblookup(inp->inp_table, &sin6->sin6_addr, sin6->sin6_port,
IN6_IS_ADDR_UNSPECIFIED(&inp->inp_laddr6) ? in6a : &inp->inp_laddr6,
inp->inp_lport, INPLOOKUP_IPV6)) {
- return(EADDRINUSE);
+ return (EADDRINUSE);
}
if (IN6_IS_ADDR_UNSPECIFIED(&inp->inp_laddr6) ||
(IN6_IS_ADDR_V4MAPPED(&inp->inp_laddr6) &&
@@ -532,7 +532,7 @@ in6_pcbconnect(inp, nam)
*/
inp->inp_ipv6.ip6_flow = sin6->sin6_flowinfo;
in_pcbrehash(inp);
- return(0);
+ return (0);
}
/*
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 103199beb8b..24ebf11bbba 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_src.c,v 1.13 2002/05/29 07:54:59 itojun Exp $ */
+/* $OpenBSD: in6_src.c,v 1.14 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */
/*
@@ -118,14 +118,14 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp)
*/
if (opts && (pi = opts->ip6po_pktinfo) &&
!IN6_IS_ADDR_UNSPECIFIED(&pi->ipi6_addr))
- return(&pi->ipi6_addr);
+ return (&pi->ipi6_addr);
/*
* If the source address is not specified but the socket(if any)
* is already bound, use the bound address.
*/
if (laddr && !IN6_IS_ADDR_UNSPECIFIED(laddr))
- return(laddr);
+ return (laddr);
/*
* If the caller doesn't specify the source address but
@@ -138,9 +138,9 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp)
dst);
if (ia6 == 0) {
*errorp = EADDRNOTAVAIL;
- return(0);
+ return (0);
}
- return(&satosin6(&ia6->ia_addr)->sin6_addr);
+ return (&satosin6(&ia6->ia_addr)->sin6_addr);
}
/*
@@ -161,15 +161,15 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp)
if (dstsock->sin6_scope_id < 0 ||
if_index < dstsock->sin6_scope_id) {
*errorp = ENXIO; /* XXX: better error? */
- return(0);
+ return (0);
}
ia6 = in6_ifawithscope(ifindex2ifnet[dstsock->sin6_scope_id],
dst);
if (ia6 == 0) {
*errorp = EADDRNOTAVAIL;
- return(0);
+ return (0);
}
- return(&satosin6(&ia6->ia_addr)->sin6_addr);
+ return (&satosin6(&ia6->ia_addr)->sin6_addr);
}
/*
@@ -192,9 +192,9 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp)
ia6 = in6_ifawithscope(ifp, dst);
if (ia6 == 0) {
*errorp = EADDRNOTAVAIL;
- return(0);
+ return (0);
}
- return(&satosin6(&ia6->ia_addr)->sin6_addr);
+ return (&satosin6(&ia6->ia_addr)->sin6_addr);
}
}
@@ -217,9 +217,9 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp)
}
if (ia6 == 0) {
*errorp = EADDRNOTAVAIL;
- return(0);
+ return (0);
}
- return(&satosin6(&ia6->ia_addr)->sin6_addr);
+ return (&satosin6(&ia6->ia_addr)->sin6_addr);
}
}
@@ -279,19 +279,19 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp)
if (ia6 == 0)
ia6 = ifatoia6(ifa_ifwithnet(sin6tosa(&sin6)));
if (ia6 == 0)
- return(0);
- return(&satosin6(&ia6->ia_addr)->sin6_addr);
+ return (0);
+ return (&satosin6(&ia6->ia_addr)->sin6_addr);
}
#endif /* 0 */
if (ia6 == 0) {
*errorp = EHOSTUNREACH; /* no route */
- return(0);
+ return (0);
}
- return(&satosin6(&ia6->ia_addr)->sin6_addr);
+ return (&satosin6(&ia6->ia_addr)->sin6_addr);
}
*errorp = EADDRNOTAVAIL;
- return(0);
+ return (0);
}
/*
@@ -309,11 +309,11 @@ in6_selecthlim(in6p, ifp)
struct ifnet *ifp;
{
if (in6p && in6p->in6p_hops >= 0)
- return(in6p->in6p_hops);
+ return (in6p->in6p_hops);
else if (ifp)
- return(ND_IFINFO(ifp)->chlim);
+ return (ND_IFINFO(ifp)->chlim);
else
- return(ip6_defhlim);
+ return (ip6_defhlim);
}
#undef in6pcb
#undef in6p_hops
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c
index 5da3722e605..a26b52e9c22 100644
--- a/sys/netinet6/ip6_input.c
+++ b/sys/netinet6/ip6_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_input.c,v 1.44 2002/06/08 21:22:03 itojun Exp $ */
+/* $OpenBSD: ip6_input.c,v 1.45 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -720,11 +720,11 @@ ip6_hopopts_input(plenp, rtalertp, mp, offp)
if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh),
hbhlen, rtalertp, plenp) < 0)
- return(-1);
+ return (-1);
*offp = off;
*mp = m;
- return(0);
+ return (0);
}
/*
@@ -884,14 +884,14 @@ ip6_unknown_opt(optp, m, off)
switch (IP6OPT_TYPE(*optp)) {
case IP6OPT_TYPE_SKIP: /* ignore the option */
- return((int)*(optp + 1));
+ return ((int)*(optp + 1));
case IP6OPT_TYPE_DISCARD: /* silently discard */
m_freem(m);
- return(-1);
+ return (-1);
case IP6OPT_TYPE_FORCEICMP: /* send ICMP even if multicasted */
ip6stat.ip6s_badoptions++;
icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_OPTION, off);
- return(-1);
+ return (-1);
case IP6OPT_TYPE_ICMP: /* send ICMP if not multicasted */
ip6stat.ip6s_badoptions++;
ip6 = mtod(m, struct ip6_hdr *);
@@ -901,11 +901,11 @@ ip6_unknown_opt(optp, m, off)
else
icmp6_error(m, ICMP6_PARAM_PROB,
ICMP6_PARAMPROB_OPTION, off);
- return(-1);
+ return (-1);
}
m_freem(m); /* XXX: NOTREACHED */
- return(-1);
+ return (-1);
}
/*
@@ -1249,7 +1249,7 @@ ip6_get_prevhdr(m, off)
struct ip6_hdr *ip6 = mtod(m, struct ip6_hdr *);
if (off == sizeof(struct ip6_hdr))
- return(&ip6->ip6_nxt);
+ return (&ip6->ip6_nxt);
else {
int len, nxt;
struct ip6_ext *ip6e = NULL;
@@ -1273,7 +1273,7 @@ ip6_get_prevhdr(m, off)
nxt = ip6e->ip6e_nxt;
}
if (ip6e)
- return(&ip6e->ip6e_nxt);
+ return (&ip6e->ip6e_nxt);
else
return NULL;
}
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index 94cdf9f798e..bb928b0358b 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_mroute.c,v 1.28 2002/07/25 12:43:28 itojun Exp $ */
+/* $OpenBSD: ip6_mroute.c,v 1.29 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: ip6_mroute.c,v 1.45 2001/03/25 08:38:51 itojun Exp $ */
/*
@@ -280,10 +280,10 @@ mrt6_ioctl(cmd, data)
switch (cmd) {
case SIOCGETSGCNT_IN6:
- return(get_sg_cnt((struct sioc_sg_req6 *)data));
+ return (get_sg_cnt((struct sioc_sg_req6 *)data));
break; /* for safety */
case SIOCGETMIFCNT_IN6:
- return(get_mif6_cnt((struct sioc_mif_req6 *)data));
+ return (get_mif6_cnt((struct sioc_mif_req6 *)data));
break; /* for safety */
default:
return (EINVAL);
@@ -311,7 +311,7 @@ get_sg_cnt(req)
req->bytecnt = rt->mf6c_byte_cnt;
req->wrong_if = rt->mf6c_wrong_if;
} else
- return(ESRCH);
+ return (ESRCH);
#if 0
req->pktcnt = req->bytecnt = req->wrong_if = 0xffffffff;
#endif
@@ -1621,7 +1621,7 @@ pim6_input(mp, offp, proto)
log(LOG_DEBUG,"pim6_input: PIM packet too short\n");
#endif
m_freem(m);
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
/*
@@ -1675,7 +1675,7 @@ pim6_input(mp, offp, proto)
"pim6_input: invalid checksum\n");
#endif
m_freem(m);
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
}
#endif /* PIM_CHECKSUM */
@@ -1689,7 +1689,7 @@ pim6_input(mp, offp, proto)
pim->pim_ver, PIM_VERSION);
#endif
m_freem(m);
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
if (pim->pim_type == PIM_REGISTER) {
@@ -1715,7 +1715,7 @@ pim6_input(mp, offp, proto)
reg_mif_num);
#endif
m_freem(m);
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
reghdr = (u_int32_t *)(pim + 1);
@@ -1736,7 +1736,7 @@ pim6_input(mp, offp, proto)
pimlen, ip6_sprintf(&ip6->ip6_src));
#endif
m_freem(m);
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
eip6 = (struct ip6_hdr *) (reghdr + 1);
@@ -1759,7 +1759,7 @@ pim6_input(mp, offp, proto)
(eip6->ip6_vfc & IPV6_VERSION));
#endif
m_freem(m);
- return(IPPROTO_NONE);
+ return (IPPROTO_NONE);
}
/* verify the inner packet is destined to a mcast group */
@@ -1773,7 +1773,7 @@ pim6_input(mp, offp, proto)
ip6_sprintf(&eip6->ip6_dst));
#endif
m_freem(m);
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
/*
@@ -1787,7 +1787,7 @@ pim6_input(mp, offp, proto)
"could not copy register head\n");
#endif
m_freem(m);
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
/*
@@ -1821,5 +1821,5 @@ pim6_input(mp, offp, proto)
*/
pim6_input_to_daemon:
rip6_input(&m, offp, proto);
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index ba86e73354e..17b82f001fb 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.69 2002/06/09 14:38:39 itojun Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.70 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -934,7 +934,7 @@ done:
RTFREE(ro_pmtu->ro_rt);
}
- return(error);
+ return (error);
freehdrs:
m_freem(exthdrs.ip6e_hbh); /* m_freem will check if mbuf is 0 */
@@ -956,17 +956,17 @@ ip6_copyexthdr(mp, hdr, hlen)
struct mbuf *m;
if (hlen > MCLBYTES)
- return(ENOBUFS); /* XXX */
+ return (ENOBUFS); /* XXX */
MGET(m, M_DONTWAIT, MT_DATA);
if (!m)
- return(ENOBUFS);
+ return (ENOBUFS);
if (hlen > MLEN) {
MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_free(m);
- return(ENOBUFS);
+ return (ENOBUFS);
}
}
m->m_len = hlen;
@@ -974,7 +974,7 @@ ip6_copyexthdr(mp, hdr, hlen)
bcopy(hdr, mtod(m, caddr_t), hlen);
*mp = m;
- return(0);
+ return (0);
}
/*
@@ -1000,7 +1000,7 @@ ip6_insert_jumboopt(exthdrs, plen)
if (exthdrs->ip6e_hbh == 0) {
MGET(mopt, M_DONTWAIT, MT_DATA);
if (mopt == 0)
- return(ENOBUFS);
+ return (ENOBUFS);
mopt->m_len = JUMBOOPTLEN;
optbuf = mtod(mopt, u_char *);
optbuf[1] = 0; /* = ((JUMBOOPTLEN) >> 3) - 1 */
@@ -1024,7 +1024,7 @@ ip6_insert_jumboopt(exthdrs, plen)
* not fit even in an mbuf cluster.
*/
if (oldoptlen + JUMBOOPTLEN > MCLBYTES)
- return(ENOBUFS);
+ return (ENOBUFS);
/*
* As a consequence, we must always prepare a cluster
@@ -1039,7 +1039,7 @@ ip6_insert_jumboopt(exthdrs, plen)
}
}
if (!n)
- return(ENOBUFS);
+ return (ENOBUFS);
n->m_len = oldoptlen + JUMBOOPTLEN;
bcopy(mtod(mopt, caddr_t), mtod(n, caddr_t),
oldoptlen);
@@ -1070,7 +1070,7 @@ ip6_insert_jumboopt(exthdrs, plen)
/* finally, adjust the packet header length */
exthdrs->ip6e_ip6->m_pkthdr.len += JUMBOOPTLEN;
- return(0);
+ return (0);
#undef JUMBOOPTLEN
}
@@ -1089,7 +1089,7 @@ ip6_insertfraghdr(m0, m, hlen, frghdrp)
n = m_copym(m0, sizeof(struct ip6_hdr),
hlen - sizeof(struct ip6_hdr), M_DONTWAIT);
if (n == 0)
- return(ENOBUFS);
+ return (ENOBUFS);
m->m_next = n;
} else
n = m;
@@ -1111,13 +1111,13 @@ ip6_insertfraghdr(m0, m, hlen, frghdrp)
MGET(mfrg, M_DONTWAIT, MT_DATA);
if (mfrg == 0)
- return(ENOBUFS);
+ return (ENOBUFS);
mfrg->m_len = sizeof(struct ip6_frag);
*frghdrp = mtod(mfrg, struct ip6_frag *);
mlast->m_next = mfrg;
}
- return(0);
+ return (0);
}
static int
@@ -1180,7 +1180,7 @@ ip6_getpmtu(ro_pmtu, ro, ifp, dst, mtup)
error = EHOSTUNREACH; /* XXX */
*mtup = mtu;
- return(error);
+ return (error);
}
/*
@@ -1216,7 +1216,7 @@ ip6_ctloutput(op, so, level, optname, mp)
switch (optname) {
case IPV6_PKTOPTIONS:
/* m is freed in ip6_pcbopts */
- return(ip6_pcbopts(&inp->inp_outputopts6,
+ return (ip6_pcbopts(&inp->inp_outputopts6,
m, so));
case IPV6_HOPOPTS:
case IPV6_DSTOPTS:
@@ -1597,7 +1597,7 @@ do { \
if (op == PRCO_SETOPT && *mp)
(void)m_free(*mp);
}
- return(error);
+ return (error);
}
int
@@ -1617,7 +1617,7 @@ ip6_raw_ctloutput(op, so, level, optname, mp)
if (level != IPPROTO_IPV6) {
if (op == PRCO_SETOPT && *mp)
(void)m_free(*mp);
- return(EINVAL);
+ return (EINVAL);
}
switch (optname) {
@@ -1673,7 +1673,7 @@ ip6_raw_ctloutput(op, so, level, optname, mp)
if (op == PRCO_SETOPT && m)
(void)m_free(m);
- return(error);
+ return (error);
}
/*
@@ -1708,7 +1708,7 @@ ip6_pcbopts(pktopt, m, so)
free(opt, M_IP6OPT);
if (m)
(void)m_free(m);
- return(0);
+ return (0);
}
/* set options specified by user. */
@@ -1716,10 +1716,10 @@ ip6_pcbopts(pktopt, m, so)
priv = 1;
if ((error = ip6_setpktoptions(m, opt, priv)) != 0) {
(void)m_free(m);
- return(error);
+ return (error);
}
*pktopt = opt;
- return(0);
+ return (0);
}
/*
@@ -1750,7 +1750,7 @@ ip6_setmoptions(optname, im6op, m)
malloc(sizeof(*im6o), M_IPMOPTS, M_WAITOK);
if (im6o == NULL)
- return(ENOBUFS);
+ return (ENOBUFS);
*im6op = im6o;
im6o->im6o_multicast_ifp = NULL;
im6o->im6o_multicast_hlim = ip6_defmcasthlim;
@@ -2000,7 +2000,7 @@ ip6_setmoptions(optname, im6op, m)
*im6op = NULL;
}
- return(error);
+ return (error);
}
/*
@@ -2025,7 +2025,7 @@ ip6_getmoptions(optname, im6o, mp)
*ifindex = 0;
else
*ifindex = im6o->im6o_multicast_ifp->if_index;
- return(0);
+ return (0);
case IPV6_MULTICAST_HOPS:
hlim = mtod(*mp, u_int *);
@@ -2034,7 +2034,7 @@ ip6_getmoptions(optname, im6o, mp)
*hlim = ip6_defmcasthlim;
else
*hlim = im6o->im6o_multicast_hlim;
- return(0);
+ return (0);
case IPV6_MULTICAST_LOOP:
loop = mtod(*mp, u_int *);
@@ -2043,10 +2043,10 @@ ip6_getmoptions(optname, im6o, mp)
*loop = ip6_defmcasthlim;
else
*loop = im6o->im6o_multicast_loop;
- return(0);
+ return (0);
default:
- return(EOPNOTSUPP);
+ return (EOPNOTSUPP);
}
}
@@ -2081,7 +2081,7 @@ ip6_setpktoptions(control, opt, priv)
struct cmsghdr *cm = 0;
if (control == 0 || opt == 0)
- return(EINVAL);
+ return (EINVAL);
bzero(opt, sizeof(*opt));
opt->ip6po_hlim = -1; /* -1 means to use default hop limit */
@@ -2091,7 +2091,7 @@ ip6_setpktoptions(control, opt, priv)
* in a single mbuf.
*/
if (control->m_next)
- return(EINVAL);
+ return (EINVAL);
opt->ip6po_m = control;
@@ -2099,14 +2099,14 @@ ip6_setpktoptions(control, opt, priv)
control->m_len -= CMSG_ALIGN(cm->cmsg_len)) {
cm = mtod(control, struct cmsghdr *);
if (cm->cmsg_len == 0 || cm->cmsg_len > control->m_len)
- return(EINVAL);
+ return (EINVAL);
if (cm->cmsg_level != IPPROTO_IPV6)
continue;
switch (cm->cmsg_type) {
case IPV6_PKTINFO:
if (cm->cmsg_len != CMSG_LEN(sizeof(struct in6_pktinfo)))
- return(EINVAL);
+ return (EINVAL);
opt->ip6po_pktinfo = (struct in6_pktinfo *)CMSG_DATA(cm);
if (opt->ip6po_pktinfo->ipi6_ifindex &&
IN6_IS_ADDR_LINKLOCAL(&opt->ip6po_pktinfo->ipi6_addr))
@@ -2115,7 +2115,7 @@ ip6_setpktoptions(control, opt, priv)
if (opt->ip6po_pktinfo->ipi6_ifindex > if_index ||
opt->ip6po_pktinfo->ipi6_ifindex < 0) {
- return(ENXIO);
+ return (ENXIO);
}
/*
@@ -2138,11 +2138,11 @@ ip6_setpktoptions(control, opt, priv)
(opt->ip6po_pktinfo->ipi6_ifindex &&
(ia->ifa_ifp->if_index !=
opt->ip6po_pktinfo->ipi6_ifindex))) {
- return(EADDRNOTAVAIL);
+ return (EADDRNOTAVAIL);
}
ia6 = (struct in6_ifaddr *)ia;
if ((ia6->ia6_flags & (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY)) != 0) {
- return(EADDRNOTAVAIL);
+ return (EADDRNOTAVAIL);
}
/*
@@ -2151,28 +2151,28 @@ ip6_setpktoptions(control, opt, priv)
* node.
*/
if (IN6_IS_ADDR_MULTICAST(&opt->ip6po_pktinfo->ipi6_addr))
- return(EADDRNOTAVAIL);
+ return (EADDRNOTAVAIL);
}
break;
case IPV6_HOPLIMIT:
if (cm->cmsg_len != CMSG_LEN(sizeof(int)))
- return(EINVAL);
+ return (EINVAL);
bcopy(CMSG_DATA(cm), &opt->ip6po_hlim,
sizeof(opt->ip6po_hlim));
if (opt->ip6po_hlim < -1 || opt->ip6po_hlim > 255)
- return(EINVAL);
+ return (EINVAL);
break;
case IPV6_NEXTHOP:
if (!priv)
- return(EPERM);
+ return (EPERM);
/* check if cmsg_len is large enough for sa_len */
if (cm->cmsg_len < sizeof(u_char) ||
cm->cmsg_len < CMSG_LEN(*CMSG_DATA(cm)))
- return(EINVAL);
+ return (EINVAL);
opt->ip6po_nexthop = (struct sockaddr *)CMSG_DATA(cm);
@@ -2180,16 +2180,16 @@ ip6_setpktoptions(control, opt, priv)
case IPV6_HOPOPTS:
if (cm->cmsg_len < CMSG_LEN(sizeof(struct ip6_hbh)))
- return(EINVAL);
+ return (EINVAL);
opt->ip6po_hbh = (struct ip6_hbh *)CMSG_DATA(cm);
if (cm->cmsg_len !=
CMSG_LEN((opt->ip6po_hbh->ip6h_len + 1) << 3))
- return(EINVAL);
+ return (EINVAL);
break;
case IPV6_DSTOPTS:
if (cm->cmsg_len < CMSG_LEN(sizeof(struct ip6_dest)))
- return(EINVAL);
+ return (EINVAL);
/*
* If there is no routing header yet, the destination
@@ -2202,40 +2202,40 @@ ip6_setpktoptions(control, opt, priv)
(struct ip6_dest *)CMSG_DATA(cm);
if (cm->cmsg_len !=
CMSG_LEN((opt->ip6po_dest1->ip6d_len + 1) << 3));
- return(EINVAL);
+ return (EINVAL);
}
else {
opt->ip6po_dest2 =
(struct ip6_dest *)CMSG_DATA(cm);
if (cm->cmsg_len !=
CMSG_LEN((opt->ip6po_dest2->ip6d_len + 1) << 3))
- return(EINVAL);
+ return (EINVAL);
}
break;
case IPV6_RTHDR:
if (cm->cmsg_len < CMSG_LEN(sizeof(struct ip6_rthdr)))
- return(EINVAL);
+ return (EINVAL);
opt->ip6po_rthdr = (struct ip6_rthdr *)CMSG_DATA(cm);
if (cm->cmsg_len !=
CMSG_LEN((opt->ip6po_rthdr->ip6r_len + 1) << 3))
- return(EINVAL);
+ return (EINVAL);
switch (opt->ip6po_rthdr->ip6r_type) {
case IPV6_RTHDR_TYPE_0:
if (opt->ip6po_rthdr->ip6r_segleft == 0)
- return(EINVAL);
+ return (EINVAL);
break;
default:
- return(EINVAL);
+ return (EINVAL);
}
break;
default:
- return(ENOPROTOOPT);
+ return (ENOPROTOOPT);
}
}
- return(0);
+ return (0);
}
/*
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index ce867b1dbf6..67b0a1c8a35 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.56 2002/09/04 07:30:51 itojun Exp $ */
+/* $OpenBSD: nd6.c,v 1.57 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -674,7 +674,7 @@ nd6_lookup(addr6, create, ifp)
struct ifaddr *ifa =
ifaof_ifpforaddr((struct sockaddr *)&sin6, ifp);
if (ifa == NULL)
- return(NULL);
+ return (NULL);
/*
* Create a new route. RTF_LLINFO is necessary
@@ -692,17 +692,17 @@ nd6_lookup(addr6, create, ifp)
"neighbor(%s), errno=%d\n",
ip6_sprintf(addr6), e);
#endif
- return(NULL);
+ return (NULL);
}
if (rt == NULL)
- return(NULL);
+ return (NULL);
if (rt->rt_llinfo) {
struct llinfo_nd6 *ln =
(struct llinfo_nd6 *)rt->rt_llinfo;
ln->ln_state = ND6_LLINFO_NOSTATE;
}
} else
- return(NULL);
+ return (NULL);
}
rt->rt_refcnt--;
/*
@@ -725,9 +725,9 @@ nd6_lookup(addr6, create, ifp)
"nd6_lookup: failed to lookup %s (if = %s)\n",
ip6_sprintf(addr6), ifp ? ifp->if_xname : "unspec");
}
- return(NULL);
+ return (NULL);
}
- return(rt);
+ return (rt);
}
/*
@@ -750,7 +750,7 @@ nd6_is_addr_neighbor(addr, ifp)
*/
if (IN6_IS_ADDR_LINKLOCAL(&addr->sin6_addr) &&
ntohs(*(u_int16_t *)&addr->sin6_addr.s6_addr[2]) == ifp->if_index)
- return(1);
+ return (1);
/*
* If the address matches one of our on-link prefixes, it should be a
@@ -776,7 +776,7 @@ nd6_is_addr_neighbor(addr, ifp)
*/
if (!ip6_forwarding && TAILQ_FIRST(&nd_defrouter) == NULL &&
nd6_defifindex == ifp->if_index) {
- return(1);
+ return (1);
}
/*
@@ -784,9 +784,9 @@ nd6_is_addr_neighbor(addr, ifp)
* in the neighbor cache.
*/
if ((rt = nd6_lookup(&addr->sin6_addr, 0, ifp)) != NULL)
- return(1);
+ return (1);
- return(0);
+ return (0);
}
/*
@@ -831,7 +831,7 @@ nd6_free(rt, gc)
*/
ln->ln_expire = dr->expire;
splx(s);
- return(ln->ln_next);
+ return (ln->ln_next);
}
if (ln->ln_router || dr) {
@@ -891,7 +891,7 @@ nd6_free(rt, gc)
rtrequest(RTM_DELETE, rt_key(rt), (struct sockaddr *)0,
rt_mask(rt), 0, (struct rtentry **)0);
- return(next);
+ return (next);
}
/*
@@ -1410,10 +1410,10 @@ nd6_ioctl(cmd, data, ifp)
ndif->ifindex = nd6_defifindex;
break;
case SIOCSDEFIFACE_IN6: /* XXX: should be implemented as a sysctl? */
- return(nd6_setdefaultiface(ndif->ifindex));
+ return (nd6_setdefaultiface(ndif->ifindex));
break;
}
- return(error);
+ return (error);
}
/*
@@ -1845,7 +1845,7 @@ nd6_output(ifp, origifp, m0, dst, rt0)
ND6_RETRANS_SEC(ND_IFINFO(ifp)->retrans);
nd6_ns_output(ifp, NULL, &dst->sin6_addr, ln, 0);
}
- return(0);
+ return (0);
sendpkt:
#ifdef IPSEC
@@ -1866,7 +1866,7 @@ nd6_output(ifp, origifp, m0, dst, rt0)
goto bad;
}
#endif /* IPSEC */
- return((*ifp->if_output)(origifp, m, (struct sockaddr *)dst,
+ return ((*ifp->if_output)(origifp, m, (struct sockaddr *)dst,
rt));
}
#ifdef IPSEC
@@ -1878,7 +1878,7 @@ nd6_output(ifp, origifp, m0, dst, rt0)
goto bad;
}
#endif /* IPSEC */
- return((*ifp->if_output)(ifp, m, (struct sockaddr *)dst, rt));
+ return ((*ifp->if_output)(ifp, m, (struct sockaddr *)dst, rt));
bad:
if (m)
@@ -1907,9 +1907,9 @@ nd6_need_cache(ifp)
case IFT_L2VLAN:
case IFT_IEEE80211:
case IFT_GIF: /* XXX need more cases? */
- return(1);
+ return (1);
default:
- return(0);
+ return (0);
}
}
@@ -1929,26 +1929,26 @@ nd6_storelladdr(ifp, rt, m, dst, desten)
case IFT_FDDI:
ETHER_MAP_IPV6_MULTICAST(&SIN6(dst)->sin6_addr,
desten);
- return(1);
+ return (1);
break;
case IFT_ARCNET:
*desten = 0;
- return(1);
+ return (1);
default:
m_freem(m);
- return(0);
+ return (0);
}
}
if (rt == NULL) {
/* this could happen, if we could not allocate memory */
m_freem(m);
- return(0);
+ return (0);
}
if (rt->rt_gateway->sa_family != AF_LINK) {
printf("nd6_storelladdr: something odd happens\n");
m_freem(m);
- return(0);
+ return (0);
}
sdl = SDL(rt->rt_gateway);
if (sdl->sdl_alen == 0) {
@@ -1956,11 +1956,11 @@ nd6_storelladdr(ifp, rt, m, dst, desten)
printf("nd6_storelladdr: sdl_alen == 0, dst=%s, if=%s\n",
ip6_sprintf(&SIN6(dst)->sin6_addr), ifp->if_xname);
m_freem(m);
- return(0);
+ return (0);
}
bcopy(LLADDR(sdl), desten, sdl->sdl_alen);
- return(1);
+ return (1);
}
int
@@ -2010,7 +2010,7 @@ nd6_sysctl(name, oldp, oldlenp, newp, newlen)
if (p)
free(p, M_TEMP);
- return(error);
+ return (error);
}
static int
@@ -2061,7 +2061,7 @@ fill_drlist(oldp, oldlenp, ol)
splx(s);
- return(error);
+ return (error);
}
static int
@@ -2163,5 +2163,5 @@ fill_prlist(oldp, oldlenp, ol)
splx(s);
- return(error);
+ return (error);
}
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index 7842663689f..0ea0c3c9e5a 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6_rtr.c,v 1.22 2002/07/30 23:30:08 itojun Exp $ */
+/* $OpenBSD: nd6_rtr.c,v 1.23 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: nd6_rtr.c,v 1.97 2001/02/07 11:09:13 itojun Exp $ */
/*
@@ -588,11 +588,11 @@ defrouter_lookup(addr, ifp)
for (dr = TAILQ_FIRST(&nd_defrouter); dr;
dr = TAILQ_NEXT(dr, dr_entry)) {
if (dr->ifp == ifp && IN6_ARE_ADDR_EQUAL(addr, &dr->rtaddr)) {
- return(dr);
+ return (dr);
}
}
- return(NULL); /* search failed */
+ return (NULL); /* search failed */
}
void
@@ -903,7 +903,7 @@ defrtrlist_update(new)
*/
if (rtpref(new) == oldpref) {
splx(s);
- return(dr);
+ return (dr);
}
/*
@@ -920,19 +920,19 @@ defrtrlist_update(new)
goto insert;
}
splx(s);
- return(dr);
+ return (dr);
}
/* entry does not exist */
if (new->rtlifetime == 0) {
splx(s);
- return(NULL);
+ return (NULL);
}
n = (struct nd_defrouter *)malloc(sizeof(*n), M_IP6NDP, M_NOWAIT);
if (n == NULL) {
splx(s);
- return(NULL);
+ return (NULL);
}
bzero(n, sizeof(*n));
*n = *new;
@@ -960,7 +960,7 @@ insert:
splx(s);
- return(n);
+ return (n);
}
static struct nd_pfxrouter *
@@ -975,7 +975,7 @@ pfxrtr_lookup(pr, dr)
break;
}
- return(search);
+ return (search);
}
static void
@@ -1019,7 +1019,7 @@ nd6_prefix_lookup(pr)
}
}
- return(search);
+ return (search);
}
int
@@ -1396,7 +1396,7 @@ find_pfxlist_reachable_router(pr)
break; /* found */
}
- return(pfxrtr);
+ return (pfxrtr);
}
/*
@@ -1574,7 +1574,7 @@ nd6_prefix_onlink(pr)
nd6log((LOG_ERR,
"nd6_prefix_onlink: %s/%d is already on-link\n",
ip6_sprintf(&pr->ndpr_prefix.sin6_addr), pr->ndpr_plen);
- return(EEXIST));
+ return (EEXIST));
}
/*
@@ -1594,7 +1594,7 @@ nd6_prefix_onlink(pr)
if (opr->ndpr_plen == pr->ndpr_plen &&
in6_are_prefix_equal(&pr->ndpr_prefix.sin6_addr,
&opr->ndpr_prefix.sin6_addr, pr->ndpr_plen))
- return(0);
+ return (0);
}
/*
@@ -1626,7 +1626,7 @@ nd6_prefix_onlink(pr)
" to add route for a prefix(%s/%d) on %s\n",
ip6_sprintf(&pr->ndpr_prefix.sin6_addr),
pr->ndpr_plen, ifp->if_xname));
- return(0);
+ return (0);
}
/*
@@ -1666,7 +1666,7 @@ nd6_prefix_onlink(pr)
if (rt != NULL)
rt->rt_refcnt--;
- return(error);
+ return (error);
}
int
@@ -1684,7 +1684,7 @@ nd6_prefix_offlink(pr)
nd6log((LOG_ERR,
"nd6_prefix_offlink: %s/%d is already off-link\n",
ip6_sprintf(&pr->ndpr_prefix.sin6_addr), pr->ndpr_plen));
- return(EEXIST);
+ return (EEXIST);
}
bzero(&sa6, sizeof(sa6));
@@ -1759,7 +1759,7 @@ nd6_prefix_offlink(pr)
}
}
- return(error);
+ return (error);
}
static struct in6_ifaddr *
@@ -1871,12 +1871,12 @@ in6_ifadd(pr)
"in6_ifadd: failed to make ifaddr %s on %s (errno=%d)\n",
ip6_sprintf(&ifra.ifra_addr.sin6_addr), ifp->if_xname,
error));
- return(NULL); /* ifaddr must not have been allocated. */
+ return (NULL); /* ifaddr must not have been allocated. */
}
ia = in6ifa_ifpwithaddr(ifp, &ifra.ifra_addr.sin6_addr);
- return(ia); /* this is always non-NULL */
+ return (ia); /* this is always non-NULL */
}
int
@@ -1961,10 +1961,10 @@ rt6_deleteroute(rn, arg)
struct in6_addr *gate = (struct in6_addr *)arg;
if (rt->rt_gateway == NULL || rt->rt_gateway->sa_family != AF_INET6)
- return(0);
+ return (0);
if (!IN6_ARE_ADDR_EQUAL(gate, &SIN6(rt->rt_gateway)->sin6_addr))
- return(0);
+ return (0);
/*
* Do not delete a static route.
@@ -1972,16 +1972,16 @@ rt6_deleteroute(rn, arg)
* 'cloned' bit instead?
*/
if ((rt->rt_flags & RTF_STATIC) != 0)
- return(0);
+ return (0);
/*
* We delete only host route. This means, in particular, we don't
* delete default route.
*/
if ((rt->rt_flags & RTF_HOST) == 0)
- return(0);
+ return (0);
- return(rtrequest(RTM_DELETE, rt_key(rt), rt->rt_gateway,
+ return (rtrequest(RTM_DELETE, rt_key(rt), rt->rt_gateway,
rt_mask(rt), rt->rt_flags, 0));
#undef SIN6
}
@@ -1993,7 +1993,7 @@ nd6_setdefaultiface(ifindex)
int error = 0;
if (ifindex < 0 || if_index < ifindex)
- return(EINVAL);
+ return (EINVAL);
if (nd6_defifindex != ifindex) {
nd6_defifindex = ifindex;
@@ -2008,5 +2008,5 @@ nd6_setdefaultiface(ifindex)
defrouter_select();
}
- return(error);
+ return (error);
}
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c
index ae8346b2c85..51f2b3812c1 100644
--- a/sys/netinet6/raw_ip6.c
+++ b/sys/netinet6/raw_ip6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raw_ip6.c,v 1.15 2002/07/20 23:00:33 itojun Exp $ */
+/* $OpenBSD: raw_ip6.c,v 1.16 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: raw_ip6.c,v 1.69 2001/03/04 15:55:44 itojun Exp $ */
/*
@@ -511,7 +511,7 @@ rip6_output(struct mbuf *m, ...)
RTFREE(optp->ip6po_route.ro_rt);
if (control)
m_freem(control);
- return(error);
+ return (error);
}
/*
@@ -806,7 +806,7 @@ rip6_usrreq(so, req, m, nam, control, p)
/*
* stat: don't bother with a blocksize
*/
- return(0);
+ return (0);
/*
* Not supported.
*/
@@ -831,5 +831,5 @@ rip6_usrreq(so, req, m, nam, control, p)
}
if (m != NULL)
m_freem(m);
- return(error);
+ return (error);
}
diff --git a/sys/netinet6/route6.c b/sys/netinet6/route6.c
index 951c692344d..045ed07eefb 100644
--- a/sys/netinet6/route6.c
+++ b/sys/netinet6/route6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route6.c,v 1.7 2002/06/08 00:08:40 itojun Exp $ */
+/* $OpenBSD: route6.c,v 1.8 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: route6.c,v 1.22 2000/12/03 00:54:00 itojun Exp $ */
/*
@@ -96,7 +96,7 @@ route6_input(mp, offp, proto)
}
#endif
if (ip6_rthdr0(m, ip6, (struct ip6_rthdr0 *)rh))
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
break;
default:
/* unknown routing type */
@@ -107,11 +107,11 @@ route6_input(mp, offp, proto)
ip6stat.ip6s_badoptions++;
icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
(caddr_t)&rh->ip6r_type - (caddr_t)ip6);
- return(IPPROTO_DONE);
+ return (IPPROTO_DONE);
}
*offp += rhlen;
- return(rh->ip6r_nxt);
+ return (rh->ip6r_nxt);
}
/*
@@ -127,7 +127,7 @@ ip6_rthdr0(m, ip6, rh0)
struct in6_addr *nextaddr, tmpaddr;
if (rh0->ip6r0_segleft == 0)
- return(0);
+ return (0);
if (rh0->ip6r0_len % 2
#ifdef COMPAT_RFC1883
@@ -142,14 +142,14 @@ ip6_rthdr0(m, ip6, rh0)
ip6stat.ip6s_badoptions++;
icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
(caddr_t)&rh0->ip6r0_len - (caddr_t)ip6);
- return(-1);
+ return (-1);
}
if ((addrs = rh0->ip6r0_len / 2) < rh0->ip6r0_segleft) {
ip6stat.ip6s_badoptions++;
icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
(caddr_t)&rh0->ip6r0_segleft - (caddr_t)ip6);
- return(-1);
+ return (-1);
}
index = addrs - rh0->ip6r0_segleft;
@@ -167,7 +167,7 @@ ip6_rthdr0(m, ip6, rh0)
IN6_IS_ADDR_V4COMPAT(nextaddr)) {
ip6stat.ip6s_badoptions++;
m_freem(m);
- return(-1);
+ return (-1);
}
if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst) ||
IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_dst) ||
@@ -175,7 +175,7 @@ ip6_rthdr0(m, ip6, rh0)
IN6_IS_ADDR_V4COMPAT(&ip6->ip6_dst)) {
ip6stat.ip6s_badoptions++;
m_freem(m);
- return(-1);
+ return (-1);
}
/*
@@ -198,5 +198,5 @@ ip6_rthdr0(m, ip6, rh0)
ip6_forward(m, 1);
#endif
- return(-1); /* m would be freed in ip6_forward() */
+ return (-1); /* m would be freed in ip6_forward() */
}
diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c
index 3b068afe73e..9b92e024f48 100644
--- a/sys/netinet6/udp6_output.c
+++ b/sys/netinet6/udp6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp6_output.c,v 1.7 2002/09/04 07:26:53 itojun Exp $ */
+/* $OpenBSD: udp6_output.c,v 1.8 2002/09/11 03:15:36 itojun Exp $ */
/* $KAME: udp6_output.c,v 1.21 2001/02/07 11:51:54 itojun Exp $ */
/*
@@ -289,5 +289,5 @@ releaseopt:
in6p->in6p_outputopts = stickyopt;
m_freem(control);
}
- return(error);
+ return (error);
}