Avoid casts, change (struct ifaddr *)ia to &ia->ia_ifa.
This commit is contained in:
parent
8e3ac3ec9f
commit
8abfe600f2
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: iso.c,v 1.44 2007/12/04 10:31:14 dyoung Exp $ */
|
/* $NetBSD: iso.c,v 1.45 2007/12/05 01:20:01 dyoung Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||||
|
@ -95,7 +95,7 @@ SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: iso.c,v 1.44 2007/12/04 10:31:14 dyoung Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: iso.c,v 1.45 2007/12/05 01:20:01 dyoung Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
|
@ -523,10 +523,10 @@ iso_control(struct socket *so, u_long cmd, void *data, struct ifnet *ifp,
|
||||||
if (ia == 0)
|
if (ia == 0)
|
||||||
return (ENOBUFS);
|
return (ENOBUFS);
|
||||||
TAILQ_INSERT_TAIL(&iso_ifaddr, ia, ia_list);
|
TAILQ_INSERT_TAIL(&iso_ifaddr, ia, ia_list);
|
||||||
IFAREF((struct ifaddr *)ia);
|
IFAREF(&ia->ia_ifa);
|
||||||
TAILQ_INSERT_TAIL(&ifp->if_addrlist, (struct ifaddr *)ia,
|
TAILQ_INSERT_TAIL(&ifp->if_addrlist, &ia->ia_ifa,
|
||||||
ifa_list);
|
ifa_list);
|
||||||
IFAREF((struct ifaddr *)ia);
|
IFAREF(&ia->ia_ifa);
|
||||||
ia->ia_ifa.ifa_addr = sisotosa(&ia->ia_addr);
|
ia->ia_ifa.ifa_addr = sisotosa(&ia->ia_addr);
|
||||||
ia->ia_ifa.ifa_dstaddr = sisotosa(&ia->ia_dstaddr);
|
ia->ia_ifa.ifa_dstaddr = sisotosa(&ia->ia_dstaddr);
|
||||||
ia->ia_ifa.ifa_netmask = sisotosa(&ia->ia_sockmask);
|
ia->ia_ifa.ifa_netmask = sisotosa(&ia->ia_sockmask);
|
||||||
|
@ -609,7 +609,7 @@ iso_purgeaddr(struct ifaddr *ifa, struct ifnet *ifp)
|
||||||
struct iso_ifaddr *ia = (void *) ifa;
|
struct iso_ifaddr *ia = (void *) ifa;
|
||||||
|
|
||||||
iso_ifscrub(ifp, ia);
|
iso_ifscrub(ifp, ia);
|
||||||
TAILQ_REMOVE(&ifp->if_addrlist, (struct ifaddr *)ia, ifa_list);
|
TAILQ_REMOVE(&ifp->if_addrlist, &ia->ia_ifa, ifa_list);
|
||||||
IFAFREE(&ia->ia_ifa);
|
IFAFREE(&ia->ia_ifa);
|
||||||
TAILQ_REMOVE(&iso_ifaddr, ia, ia_list);
|
TAILQ_REMOVE(&iso_ifaddr, ia, ia_list);
|
||||||
IFAFREE((&ia->ia_ifa));
|
IFAFREE((&ia->ia_ifa));
|
||||||
|
|
Loading…
Reference in New Issue