diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-08-31 10:03:48 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-08-31 10:03:48 +0000 |
commit | 3400f73c511fdc7598d79a4aa8241d8728bdca70 (patch) | |
tree | 9276aba95f23a794c28784419f2ae4d320c7a8d4 /sys | |
parent | 24c778d0c770d614ae44f0049d82aa8bd7d1f2bd (diff) |
The return value of nd6_cache_lladdr() is never used so make it a void.
Fewer "struct rtentry" left in the wild!
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/nd6.c | 14 | ||||
-rw-r--r-- | sys/netinet6/nd6.h | 5 |
2 files changed, 8 insertions, 11 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 3fb56fe4835..4cbdfe7e688 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.148 2015/08/24 23:26:43 mpi Exp $ */ +/* $OpenBSD: nd6.c,v 1.149 2015/08/31 10:03:47 mpi Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -1306,7 +1306,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) * type - ICMP6 type * code - type dependent information */ -struct rtentry * +void nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *from, char *lladdr, int lladdrlen, int type, int code) { @@ -1326,7 +1326,7 @@ nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *from, char *lladdr, /* nothing must be updated for unspecified address */ if (IN6_IS_ADDR_UNSPECIFIED(from)) - return NULL; + return; /* * Validation about ifp->if_addrlen and lladdrlen must be done in @@ -1351,16 +1351,16 @@ nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *from, char *lladdr, } else { /* do nothing if static ndp is set */ if (rt->rt_flags & RTF_STATIC) - return NULL; + return; is_newentry = 0; } if (!rt) - return NULL; + return; if ((rt->rt_flags & (RTF_GATEWAY | RTF_LLINFO)) != RTF_LLINFO) { fail: (void)nd6_free(rt, 0); - return NULL; + return; } ln = (struct llinfo_nd6 *)rt->rt_llinfo; if (!ln) @@ -1535,8 +1535,6 @@ fail: */ if (do_update && ln->ln_router && (ifp->if_xflags & IFXF_AUTOCONF6)) defrouter_select(); - - return rt; } void diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 70be2aedc77..f1b3098f590 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.h,v 1.48 2015/08/24 23:28:27 mpi Exp $ */ +/* $OpenBSD: nd6.h,v 1.49 2015/08/31 10:03:47 mpi Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -275,8 +275,7 @@ int nd6_resolve(struct ifnet *, struct rtentry *, struct mbuf *, struct sockaddr *, u_char *); void nd6_rtrequest(int, struct rtentry *); int nd6_ioctl(u_long, caddr_t, struct ifnet *); -struct rtentry *nd6_cache_lladdr(struct ifnet *, struct in6_addr *, - char *, int, int, int); +void nd6_cache_lladdr(struct ifnet *, struct in6_addr *, char *, int, int, int); int nd6_output(struct ifnet *, struct mbuf *, struct sockaddr_in6 *, struct rtentry *); int nd6_storelladdr(struct ifnet *, struct rtentry *, struct mbuf *, |