Make in6ifa_ifpwithaddr() take const param.

Remove unneded DECONST from in6_lltable_rtcheck().
This commit is contained in:
melifaro 2015-09-05 05:54:09 +00:00
parent bbab608243
commit 3e1524c83e
2 changed files with 3 additions and 4 deletions

View File

@ -1518,7 +1518,7 @@ in6ifa_ifwithaddr(const struct in6_addr *addr, uint32_t zoneid)
* ifaddr is returned referenced.
*/
struct in6_ifaddr *
in6ifa_ifpwithaddr(struct ifnet *ifp, struct in6_addr *addr)
in6ifa_ifpwithaddr(struct ifnet *ifp, const struct in6_addr *addr)
{
struct ifaddr *ifa;
@ -2138,8 +2138,7 @@ in6_lltable_rtcheck(struct ifnet *ifp,
* Create an ND6 cache for an IPv6 neighbor
* that is not covered by our own prefix.
*/
/* XXX ifaof_ifpforaddr should take a const param */
ifa = ifaof_ifpforaddr(__DECONST(struct sockaddr *, l3addr), ifp);
ifa = ifaof_ifpforaddr(l3addr, ifp);
if (ifa != NULL) {
ifa_free(ifa);
if (rt != NULL)

View File

@ -808,7 +808,7 @@ int in6_domifmtu(struct ifnet *);
void in6_setmaxmtu(void);
int in6_if2idlen(struct ifnet *);
struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int);
struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, struct in6_addr *);
struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, const struct in6_addr *);
struct in6_ifaddr *in6ifa_ifwithaddr(const struct in6_addr *, uint32_t);
struct in6_ifaddr *in6ifa_llaonifp(struct ifnet *);
int in6_addr2zoneid(struct ifnet *, struct in6_addr *, u_int32_t *);