Don't cast to void * unnecessarily.

This commit is contained in:
dyoung 2008-05-22 01:06:39 +00:00
parent e47d9e31bc
commit a8ad22e5d9
4 changed files with 17 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_atm.c,v 1.27 2007/09/05 05:29:35 dyoung Exp $ */
/* $NetBSD: if_atm.c,v 1.28 2008/05/22 01:09:41 dyoung Exp $ */
/*
*
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_atm.c,v 1.27 2007/09/05 05:29:35 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_atm.c,v 1.28 2008/05/22 01:09:41 dyoung Exp $");
#include "opt_inet.h"
#include "opt_natm.h"
@ -164,8 +164,7 @@ atm_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info)
*/
bcopy(CLLADDR(satocsdl(gate)), &api.aph, sizeof(api.aph));
api.rxhand = NULL;
if (rt->rt_ifp->if_ioctl(rt->rt_ifp, SIOCATMENA,
(void *)&api) != 0) {
if (rt->rt_ifp->if_ioctl(rt->rt_ifp, SIOCATMENA, &api) != 0) {
printf("atm: couldn't add VC\n");
goto failed;
}
@ -207,8 +206,7 @@ failed:
bcopy(CLLADDR(satocsdl(gate)), &api.aph, sizeof(api.aph));
api.rxhand = NULL;
(void)rt->rt_ifp->if_ioctl(rt->rt_ifp, SIOCATMDIS,
(void *)&api);
(void)rt->rt_ifp->if_ioctl(rt->rt_ifp, SIOCATMDIS, &api);
break;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_mroute.c,v 1.113 2008/05/08 08:00:55 taca Exp $ */
/* $NetBSD: ip_mroute.c,v 1.114 2008/05/22 01:08:03 dyoung Exp $ */
/*
* Copyright (c) 1992, 1993
@ -93,7 +93,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.113 2008/05/08 08:00:55 taca Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.114 2008/05/22 01:08:03 dyoung Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -945,7 +945,7 @@ add_vif(struct mbuf *m)
/* Enable promiscuous reception of all IP multicasts. */
sockaddr_in_init(&sin, &zeroin_addr, 0);
ifreq_setaddr(SIOCADDMULTI, &ifr, sintosa(&sin));
error = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, (void *)&ifr);
error = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, &ifr);
if (error)
return (error);
}
@ -1030,7 +1030,7 @@ reset_vif(struct vif *vifp)
sockaddr_in_init(&sin, &zeroin_addr, 0);
ifreq_setaddr(SIOCDELMULTI, &ifr, sintosa(&sin));
ifp = vifp->v_ifp;
(*ifp->if_ioctl)(ifp, SIOCDELMULTI, (void *)&ifr);
(*ifp->if_ioctl)(ifp, SIOCDELMULTI, &ifr);
}
bzero((void *)vifp, sizeof(*vifp));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip6_mroute.c,v 1.93 2008/05/04 07:22:15 thorpej Exp $ */
/* $NetBSD: ip6_mroute.c,v 1.94 2008/05/22 01:06:39 dyoung Exp $ */
/* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */
/*
@ -117,7 +117,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.93 2008/05/04 07:22:15 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.94 2008/05/22 01:06:39 dyoung Exp $");
#include "opt_inet.h"
#include "opt_mrouting.h"
@ -537,8 +537,7 @@ ip6_mrouter_done(void)
ifr.ifr_addr.sin6_family = AF_INET6;
ifr.ifr_addr.sin6_addr= in6addr_any;
ifp = mif6table[mifi].m6_ifp;
(*ifp->if_ioctl)(ifp, SIOCDELMULTI,
(void *)&ifr);
(*ifp->if_ioctl)(ifp, SIOCDELMULTI, &ifr);
}
}
}
@ -685,7 +684,7 @@ add_m6if(struct mif6ctl *mifcp)
*/
ifr.ifr_addr.sin6_family = AF_INET6;
ifr.ifr_addr.sin6_addr = in6addr_any;
error = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, (void *)&ifr);
error = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, &ifr);
splx(s);
if (error)
return error;
@ -747,7 +746,7 @@ del_m6if(mifi_t *mifip)
ifr.ifr_addr.sin6_family = AF_INET6;
ifr.ifr_addr.sin6_addr = in6addr_any;
(*ifp->if_ioctl)(ifp, SIOCDELMULTI, (void *)&ifr);
(*ifp->if_ioctl)(ifp, SIOCDELMULTI, &ifr);
} else {
if (reg_mif_num != (mifi_t)-1) {
if_detach(&multicast_register_if6);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mld6.c,v 1.45 2008/04/24 11:38:38 ad Exp $ */
/* $NetBSD: mld6.c,v 1.46 2008/05/22 01:06:40 dyoung Exp $ */
/* $KAME: mld6.c,v 1.25 2001/01/16 14:14:18 itojun Exp $ */
/*
@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.45 2008/04/24 11:38:38 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.46 2008/05/22 01:06:40 dyoung Exp $");
#include "opt_inet.h"
@ -668,8 +668,7 @@ in6_addmulti(struct in6_addr *maddr6, struct ifnet *ifp,
if (ifp->if_ioctl == NULL)
*errorp = ENXIO; /* XXX: appropriate? */
else
*errorp = (*ifp->if_ioctl)(ifp, SIOCADDMULTI,
(void *)&ifr);
*errorp = (*ifp->if_ioctl)(ifp, SIOCADDMULTI, &ifr);
if (*errorp) {
LIST_REMOVE(in6m, in6m_entry);
free(in6m, M_IPMADDR);
@ -744,8 +743,7 @@ in6_delmulti(struct in6_multi *in6m)
* reception filter.
*/
sockaddr_in6_init(&ifr.ifr_addr, &in6m->in6m_addr, 0, 0, 0);
(*in6m->in6m_ifp->if_ioctl)(in6m->in6m_ifp,
SIOCDELMULTI, (void *)&ifr);
(*in6m->in6m_ifp->if_ioctl)(in6m->in6m_ifp, SIOCDELMULTI, &ifr);
callout_destroy(&in6m->in6m_timer_ch);
free(in6m, M_IPMADDR);
}