summaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2012-01-03 23:41:52 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2012-01-03 23:41:52 +0000
commita788b08e4a13f160295ff1c5ed5f72c192a31c6d (patch)
tree96ea4a06a86ec5229ca9811399a22cc423377398 /sys/net/if.c
parent8390485057fcecbd0fa623e72550abc20f2293e8 (diff)
To access the ifaddr of an in_ifaddr or in6_ifaddr struct, it is
cleaner to access the first member via ia_ifa instead of casting. No binary change. ok henning@ krw@
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index cbeb5ce5076..e20c7e28a85 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.240 2011/10/24 17:51:31 camield Exp $ */
+/* $OpenBSD: if.c,v 1.241 2012/01/03 23:41:51 bluhm Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -2319,13 +2319,12 @@ ifnewlladdr(struct ifnet *ifp)
/* Update the link-local address. Don't do it if we're
* a router to avoid confusing hosts on the network. */
if (!(ifp->if_xflags & IFXF_NOINET6) && !ip6_forwarding) {
- ifa = (struct ifaddr *)in6ifa_ifpforlinklocal(ifp, 0);
+ ifa = &in6ifa_ifpforlinklocal(ifp, 0)->ia_ifa;
if (ifa) {
in6_purgeaddr(ifa);
in6_ifattach_linklocal(ifp, NULL);
if (in6if_do_dad(ifp)) {
- ifa = (struct ifaddr *)
- in6ifa_ifpforlinklocal(ifp, 0);
+ ifa = &in6ifa_ifpforlinklocal(ifp, 0)->ia_ifa;
if (ifa)
nd6_dad_start(ifa, NULL);
}