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/netinet/ip_input.c | |
parent | 813f81ff28ebe684e9e8000017a775801e85afbb (diff) |
Replace some casts to struct in_ifaddr pointer by ifatoia() or NULL.
ok millert@, haesbaert@, bluhm@
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 3d8f38a3137..7c7aa4924e2 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_input.c,v 1.203 2013/03/28 00:32:11 bluhm Exp $ */ +/* $OpenBSD: ip_input.c,v 1.204 2013/03/28 12:06:55 mpi Exp $ */ /* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */ /* @@ -688,8 +688,7 @@ in_ouraddr(struct in_addr ina, struct mbuf *m) sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; sin.sin_addr = ina; - ia = (struct in_ifaddr *)ifa_ifwithaddr(sintosa(&sin), - m->m_pkthdr.rdomain); + ia = ifatoia(ifa_ifwithaddr(sintosa(&sin), m->m_pkthdr.rdomain)); if (ia == NULL) { /* @@ -745,7 +744,7 @@ in_iawithaddr(struct in_addr ina, u_int rdomain) sin.sin_len = sizeof(sin); sin.sin_family = AF_INET; sin.sin_addr = ina; - ia = (struct in_ifaddr *)ifa_ifwithaddr(sintosa(&sin), rdomain); + ia = ifatoia(ifa_ifwithaddr(sintosa(&sin), rdomain)); if (ia == NULL || ina.s_addr == ia->ia_addr.sin_addr.s_addr) return (ia); @@ -1256,7 +1255,7 @@ ip_rtaddr(struct in_addr dst, u_int rtableid) rtableid); } if (ipforward_rt.ro_rt == 0) - return ((struct in_ifaddr *)0); + return (NULL); return (ifatoia(ipforward_rt.ro_rt->rt_ifa)); } |