diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-09-11 03:15:37 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2002-09-11 03:15:37 +0000 |
commit | dc9bd593149a320bd45ff97fdb845d025d1f490b (patch) | |
tree | e81c3f9b3a126e92f99164ba619ca6a3ac5f0a42 /sys/netinet6/nd6_rtr.c | |
parent | fa38af0572fab40ec124be8a99d172c2939b8e8b (diff) |
KNF - return is not a function. sync w/kame
Diffstat (limited to 'sys/netinet6/nd6_rtr.c')
-rw-r--r-- | sys/netinet6/nd6_rtr.c | 52 |
1 files changed, 26 insertions, 26 deletions
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); } |