diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-03-28 12:06:56 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-03-28 12:06:56 +0000 |
commit | 9efd0f3534a333b6ec869aaadab31ddf7a7bbd21 (patch) | |
tree | 74fbe07c4efd008ac112b2106d93a702ac9308e7 /sys/net/if.c | |
parent | 813f81ff28ebe684e9e8000017a775801e85afbb (diff) |
Replace some casts to struct in_ifaddr pointer by ifatoia() or NULL.
ok millert@, haesbaert@, bluhm@
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 19ea4bfb961..6ee536f7ed9 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.253 2013/03/26 13:19:25 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.254 2013/03/28 12:06:55 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -607,8 +607,7 @@ do { \ ifa_del(ifp, ifa); #ifdef INET if (ifa->ifa_addr->sa_family == AF_INET) - TAILQ_REMOVE(&in_ifaddr, (struct in_ifaddr *)ifa, - ia_list); + TAILQ_REMOVE(&in_ifaddr, ifatoia(ifa), ia_list); #endif /* XXX if_free_sadl needs this */ if (ifa == ifnet_addrs[ifp->if_index]) @@ -1508,8 +1507,7 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) if (ifa->ifa_addr->sa_family != AF_INET) continue; - TAILQ_REMOVE(&in_ifaddr, - (struct in_ifaddr *)ifa, ia_list); + TAILQ_REMOVE(&in_ifaddr, ifatoia(ifa), ia_list); ifa_del(ifp, ifa); ifa->ifa_ifp = NULL; ifafree(ifa); |