diff options
author | ume <ume@FreeBSD.org> | 2003-10-06 14:02:09 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-10-06 14:02:09 +0000 |
commit | 6c1377b9efb980f7722b089efd455c1362419b76 (patch) | |
tree | 405658370f0fbb47ebebd2ecad933720d186cc45 /sys/netinet6/in6_pcb.c | |
parent | 08859b205f380a0e04ba5bfec234f9f14b1936b6 (diff) | |
download | FreeBSD-src-6c1377b9efb980f7722b089efd455c1362419b76.zip FreeBSD-src-6c1377b9efb980f7722b089efd455c1362419b76.tar.gz |
return(code) -> return (code)
(reduce diffs against KAME)
Diffstat (limited to 'sys/netinet6/in6_pcb.c')
-rw-r--r-- | sys/netinet6/in6_pcb.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 36130ff..170c6ff 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -138,18 +138,18 @@ in6_pcbbind(inp, nam, td) if (!in6_ifaddr) /* XXX broken! */ return (EADDRNOTAVAIL); if (inp->inp_lport || !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) - return(EINVAL); + return (EINVAL); if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) == 0) wild = 1; if (nam) { sin6 = (struct sockaddr_in6 *)nam; if (nam->sa_len != sizeof(*sin6)) - return(EINVAL); + return (EINVAL); /* * family check. */ if (nam->sa_family != AF_INET6) - return(EAFNOSUPPORT); + return (EAFNOSUPPORT); /* KAME hack: embed scopeid */ if (in6_embedscope(&sin6->sin6_addr, sin6, inp, NULL) != 0) @@ -173,7 +173,7 @@ in6_pcbbind(inp, nam, td) sin6->sin6_port = 0; /* yech... */ if ((ia = ifa_ifwithaddr((struct sockaddr *)sin6)) == 0) - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); /* * XXX: bind to an anycast address might accidentally @@ -184,7 +184,7 @@ in6_pcbbind(inp, nam, td) if (ia && ((struct in6_ifaddr *)ia)->ia6_flags & (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY|IN6_IFF_DETACHED)) { - return(EADDRNOTAVAIL); + return (EADDRNOTAVAIL); } } if (lport) { @@ -193,7 +193,7 @@ in6_pcbbind(inp, nam, td) /* GROSS */ if (ntohs(lport) < IPV6PORT_RESERVED && td && suser_cred(td->td_ucred, PRISON_ROOT)) - return(EACCES); + return (EACCES); if (so->so_cred->cr_uid != 0 && !IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) { t = in6_pcblookup_local(pcbinfo, @@ -246,7 +246,7 @@ in6_pcbbind(inp, nam, td) if (t && (reuseport & ((t->inp_vflag & INP_TIMEWAIT) ? intotw(t)->tw_so_options : t->inp_socket->so_options)) == 0) - return(EADDRINUSE); + return (EADDRINUSE); if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0 && IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) { struct sockaddr_in sin; @@ -276,7 +276,7 @@ in6_pcbbind(inp, nam, td) if (lport == 0) { int e; if ((e = in6_pcbsetport(&inp->in6p_laddr, inp, td)) != 0) - return(e); + return (e); } else { inp->inp_lport = lport; @@ -286,7 +286,7 @@ in6_pcbbind(inp, nam, td) return (EAGAIN); } } - return(0); + return (0); } /* @@ -343,7 +343,7 @@ in6_pcbladdr(inp, nam, plocal_addr6) if (*plocal_addr6 == 0) { if (error == 0) error = EADDRNOTAVAIL; - return(error); + return (error); } /* * Don't do pcblookup call here; return interface in @@ -355,7 +355,7 @@ in6_pcbladdr(inp, nam, plocal_addr6) if (inp->in6p_route.ro_rt) ifp = inp->in6p_route.ro_rt->rt_ifp; - return(0); + return (0); } /* @@ -380,7 +380,7 @@ in6_pcbconnect(inp, nam, td) * in6_pcbladdr() may automatically fill in sin6_scope_id. */ if ((error = in6_pcbladdr(inp, nam, &addr6)) != 0) - return(error); + return (error); if (in6_pcblookup_hash(inp->inp_pcbinfo, &sin6->sin6_addr, sin6->sin6_port, @@ -442,14 +442,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 @@ -461,9 +461,9 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) ia6 = in6_ifawithscope(ifnet_byindex(pi->ipi6_ifindex), dst); if (ia6 == 0) { *errorp = EADDRNOTAVAIL; - return(0); + return (0); } - return(&satosin6(&ia6->ia_addr)->sin6_addr); + return (&satosin6(&ia6->ia_addr)->sin6_addr); } /* @@ -484,15 +484,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(ifnet_byindex(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); } /* @@ -515,9 +515,9 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) ia6 = in6_ifawithscope(ifp, dst); if (ia6 == 0) { *errorp = EADDRNOTAVAIL; - return(0); + return (0); } - return(&ia6->ia_addr.sin6_addr); + return (&ia6->ia_addr.sin6_addr); } } @@ -540,9 +540,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); } } @@ -589,13 +589,13 @@ in6_selectsrc(dstsock, opts, mopts, ro, laddr, errorp) } 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); } /* @@ -611,11 +611,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->if_index].chlim); + return (nd_ifinfo[ifp->if_index].chlim); else - return(ip6_defhlim); + return (ip6_defhlim); } #endif |