summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_mbuf.c14
-rw-r--r--sys/net/if_gif.c8
-rw-r--r--sys/net/if_gre.c4
-rw-r--r--sys/net/pf.c8
-rw-r--r--sys/netinet/igmp.c5
-rw-r--r--sys/netinet/ip_icmp.c4
-rw-r--r--sys/netinet/ip_input.c6
-rw-r--r--sys/netinet/ip_mroute.c17
-rw-r--r--sys/netinet/ipsec_output.c6
-rw-r--r--sys/netinet/tcp_input.c7
-rw-r--r--sys/netinet/tcp_subr.c6
-rw-r--r--sys/netinet6/in6_src.c6
-rw-r--r--sys/netinet6/ip6_output.c4
13 files changed, 42 insertions, 53 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index dfa456b1b2b..d6f253f0126 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_mbuf.c,v 1.181 2014/04/14 09:06:41 mpi Exp $ */
+/* $OpenBSD: uipc_mbuf.c,v 1.182 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */
/*
@@ -222,8 +222,8 @@ m_get(int nowait, int type)
splx(s);
if (m) {
m->m_type = type;
- m->m_next = (struct mbuf *)NULL;
- m->m_nextpkt = (struct mbuf *)NULL;
+ m->m_next = NULL;
+ m->m_nextpkt = NULL;
m->m_data = m->m_dat;
m->m_flags = 0;
}
@@ -249,8 +249,8 @@ m_gethdr(int nowait, int type)
m->m_type = type;
/* keep in sync with m_inithdr */
- m->m_next = (struct mbuf *)NULL;
- m->m_nextpkt = (struct mbuf *)NULL;
+ m->m_next = NULL;
+ m->m_nextpkt = NULL;
m->m_data = m->m_pktdat;
m->m_flags = M_PKTHDR;
bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
@@ -263,8 +263,8 @@ struct mbuf *
m_inithdr(struct mbuf *m)
{
/* keep in sync with m_gethdr */
- m->m_next = (struct mbuf *)NULL;
- m->m_nextpkt = (struct mbuf *)NULL;
+ m->m_next = NULL;
+ m->m_nextpkt = NULL;
m->m_data = m->m_pktdat;
m->m_flags = M_PKTHDR;
bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index 9e295e1f449..1b7d667c277 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gif.c,v 1.64 2013/10/19 14:46:30 mpi Exp $ */
+/* $OpenBSD: if_gif.c,v 1.65 2014/04/21 11:10:54 henning Exp $ */
/* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */
/*
@@ -261,8 +261,7 @@ gif_start(struct ifnet *ifp)
switch (sc->gif_psrc->sa_family) {
#ifdef INET
case AF_INET:
- ip_output(m, (void *)NULL, (void *)NULL, 0,
- (void *)NULL, (void *)NULL);
+ ip_output(m, NULL, NULL, 0, NULL, NULL);
break;
#endif
#ifdef INET6
@@ -273,8 +272,7 @@ gif_start(struct ifnet *ifp)
* of inner packet, to achieve path MTU discovery for
* encapsulated packets.
*/
- ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL,
- NULL);
+ ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL, NULL);
break;
#endif
default:
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 9047339217e..ceba5948651 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.65 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: if_gre.c,v 1.66 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -430,7 +430,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
#endif
/* Send it off */
- error = ip_output(m, (void *)NULL, &sc->route, 0, (void *)NULL, (void *)NULL);
+ error = ip_output(m, NULL, &sc->route, 0, NULL, NULL);
end:
if (error)
ifp->if_oerrors++;
diff --git a/sys/net/pf.c b/sys/net/pf.c
index df631ea3b01..59ee0e8ff47 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.873 2014/04/19 12:59:53 henning Exp $ */
+/* $OpenBSD: pf.c,v 1.874 2014/04/21 11:10:54 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -2426,8 +2426,7 @@ pf_send_tcp(const struct pf_rule *r, sa_family_t af,
#ifdef INET
case AF_INET:
if (eh == NULL) {
- ip_output(m, (void *)NULL, (void *)NULL, 0,
- (void *)NULL, (void *)NULL);
+ ip_output(m, NULL, NULL, 0, NULL, NULL);
} else {
struct route ro;
struct rtentry rt;
@@ -2444,8 +2443,7 @@ pf_send_tcp(const struct pf_rule *r, sa_family_t af,
memcpy(e->ether_shost, eh->ether_dhost, ETHER_ADDR_LEN);
memcpy(e->ether_dhost, eh->ether_shost, ETHER_ADDR_LEN);
e->ether_type = eh->ether_type;
- ip_output(m, (void *)NULL, &ro, IP_ROUTETOETHER,
- (void *)NULL, (void *)NULL);
+ ip_output(m, NULL, &ro, IP_ROUTETOETHER, NULL, NULL);
}
break;
#endif /* INET */
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index 2babdd30dfd..0dc9d63bce0 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: igmp.c,v 1.37 2014/01/21 10:18:26 mpi Exp $ */
+/* $OpenBSD: igmp.c,v 1.38 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: igmp.c,v 1.15 1996/02/13 23:41:25 christos Exp $ */
/*
@@ -634,8 +634,7 @@ igmp_sendpkt(struct in_multi *inm, int type, in_addr_t addr)
imo.imo_multicast_loop = 0;
#endif /* MROUTING */
- ip_output(m, (struct mbuf *)0, (struct route *)0, IP_MULTICASTOPTS,
- &imo, (void *)NULL);
+ ip_output(m, NULL, NULL, IP_MULTICASTOPTS, &imo, NULL);
++igmpstat.igps_snd_reports;
}
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 4fecc8b6ced..478bcdd4bcc 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_icmp.c,v 1.119 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: ip_icmp.c,v 1.120 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */
/*
@@ -844,7 +844,7 @@ icmp_send(struct mbuf *m, struct mbuf *opts)
printf("icmp_send dst %s src %s\n", dst, src);
}
#endif
- (void)ip_output(m, opts, (void *)NULL, 0, (void *)NULL, (void *)NULL);
+ ip_output(m, opts, NULL, 0, NULL, NULL);
}
n_time
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index cdff2df43a0..b22fd7dcab6 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.229 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: ip_input.c,v 1.230 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -1472,9 +1472,9 @@ ip_forward(struct mbuf *m, struct ifnet *ifp, int srcrt)
}
}
- error = ip_output(m, (struct mbuf *)NULL, &ipforward_rt,
+ error = ip_output(m, NULL, &ipforward_rt,
(IP_FORWARDING | (ip_directedbcast ? IP_ALLOWBROADCAST : 0)),
- (void *)NULL, (void *)NULL);
+ NULL, NULL);
if (error)
ipstat.ips_cantforward++;
else {
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 7134a397842..2e4a30a3d15 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_mroute.c,v 1.64 2014/01/09 06:29:06 tedu Exp $ */
+/* $OpenBSD: ip_mroute.c,v 1.65 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */
/*
@@ -1225,8 +1225,7 @@ static int
socket_send(struct socket *s, struct mbuf *mm, struct sockaddr_in *src)
{
if (s != NULL) {
- if (sbappendaddr(&s->so_rcv, sintosa(src), mm,
- (struct mbuf *)NULL) != 0) {
+ if (sbappendaddr(&s->so_rcv, sintosa(src), mm, NULL) != 0) {
sorwakeup(s);
return (0);
}
@@ -1733,9 +1732,7 @@ send_packet(struct vif *vifp, struct mbuf *m)
if (vifp->v_flags & VIFF_TUNNEL) {
/* If tunnel options */
- ip_output(m, (struct mbuf *)NULL, &vifp->v_route,
- IP_FORWARDING, (struct ip_moptions *)NULL,
- (struct inpcb *)NULL);
+ ip_output(m, NULL, &vifp->v_route, IP_FORWARDING, NULL, NULL);
} else {
/*
* if physical interface option, extract the options
@@ -1747,9 +1744,8 @@ send_packet(struct vif *vifp, struct mbuf *m)
imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - IPTTLDEC;
imo.imo_multicast_loop = 1;
- error = ip_output(m, (struct mbuf *)NULL, (struct route *)NULL,
- IP_FORWARDING|IP_MULTICASTOPTS, &imo,
- (struct inpcb *)NULL);
+ error = ip_output(m, NULL, NULL,
+ IP_FORWARDING | IP_MULTICASTOPTS, &imo, NULL);
if (mrtdebug & DEBUG_XMIT)
log(LOG_DEBUG, "phyint_send on vif %ld err %d\n",
@@ -2762,8 +2758,7 @@ pim_input(struct mbuf *m, ...)
reg_vif_num);
}
/* NB: vifp was collected above; can it change on us? */
- looutput(vifp, m, (struct sockaddr *)&dst,
- (struct rtentry *)NULL);
+ looutput(vifp, m, (struct sockaddr *)&dst, NULL);
/* prepare the register head to send to the mrouting daemon */
m = mcp;
diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c
index 962d5cade52..5467e4dfe56 100644
--- a/sys/netinet/ipsec_output.c
+++ b/sys/netinet/ipsec_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_output.c,v 1.50 2013/10/24 11:31:43 mpi Exp $ */
+/* $OpenBSD: ipsec_output.c,v 1.51 2014/04/21 11:10:54 henning Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -511,7 +511,7 @@ ipsp_process_done(struct mbuf *m, struct tdb *tdb)
switch (tdb->tdb_dst.sa.sa_family) {
#ifdef INET
case AF_INET:
- return ip_output(m, (void *)NULL, (void *)NULL, IP_RAWOUTPUT, (void *)NULL, (void *)NULL);
+ return (ip_output(m, NULL, NULL, IP_RAWOUTPUT, NULL, NULL));
#endif /* INET */
#ifdef INET6
@@ -520,7 +520,7 @@ ipsp_process_done(struct mbuf *m, struct tdb *tdb)
* We don't need massage, IPv6 header fields are always in
* net endian.
*/
- return ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL);
+ return (ip6_output(m, NULL, NULL, 0, NULL, NULL, NULL));
#endif /* INET6 */
}
return EINVAL; /* Not reached. */
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 0572c82aeca..23208bfa025 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.273 2014/04/14 09:06:42 mpi Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.274 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -4414,8 +4414,7 @@ syn_cache_respond(struct syn_cache *sc, struct mbuf *m)
#ifdef INET
case AF_INET:
error = ip_output(m, sc->sc_ipopts, ro,
- (ip_mtudisc ? IP_MTUDISC : 0),
- (struct ip_moptions *)NULL, inp);
+ (ip_mtudisc ? IP_MTUDISC : 0), NULL, inp);
break;
#endif
#ifdef INET6
@@ -4424,7 +4423,7 @@ syn_cache_respond(struct syn_cache *sc, struct mbuf *m)
ro->ro_rt ? ro->ro_rt->rt_ifp : NULL);
error = ip6_output(m, NULL /*XXX*/, (struct route_in6 *)ro, 0,
- (struct ip6_moptions *)0, NULL, NULL);
+ NULL, NULL, NULL);
break;
#endif
default:
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 1c22f6ecfd1..aff8b95df8f 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.127 2014/04/18 15:14:25 henning Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.128 2014/04/21 11:10:54 henning Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -420,8 +420,8 @@ tcp_respond(struct tcpcb *tp, caddr_t template, struct tcphdr *th0,
ip->ip_len = htons(tlen);
ip->ip_ttl = ip_defttl;
ip->ip_tos = 0;
- ip_output(m, (void *)NULL, ro, ip_mtudisc ? IP_MTUDISC : 0,
- (void *)NULL, tp ? tp->t_inpcb : (void *)NULL);
+ ip_output(m, NULL, ro, ip_mtudisc ? IP_MTUDISC : 0,
+ NULL, tp ? tp->t_inpcb : NULL);
}
}
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 513aef2a245..7ae1f427cf9 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_src.c,v 1.42 2014/04/18 10:48:30 jca Exp $ */
+/* $OpenBSD: in6_src.c,v 1.43 2014/04/21 11:10:54 henning Exp $ */
/* $KAME: in6_src.c,v 1.36 2001/02/06 04:08:17 itojun Exp $ */
/*
@@ -421,9 +421,9 @@ selectroute(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
sin6tosa(&ro->ro_dst)->sa_family != AF_INET6 ||
!IN6_ARE_ADDR_EQUAL(&ro->ro_dst.sin6_addr, dst))) {
RTFREE(ro->ro_rt);
- ro->ro_rt = (struct rtentry *)NULL;
+ ro->ro_rt = NULL;
}
- if (ro->ro_rt == (struct rtentry *)NULL) {
+ if (ro->ro_rt == NULL) {
struct sockaddr_in6 *sa6;
/* No route yet, so try to acquire one */
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 6e38cb1a8c1..d9355271a7b 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip6_output.c,v 1.155 2014/04/20 16:48:22 naddy Exp $ */
+/* $OpenBSD: ip6_output.c,v 1.156 2014/04/21 11:10:54 henning Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -1221,7 +1221,7 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, struct route_in6 *ro,
((ro_pmtu->ro_rt->rt_flags & RTF_UP) == 0 ||
!IN6_ARE_ADDR_EQUAL(&sa6_dst->sin6_addr, dst))) {
RTFREE(ro_pmtu->ro_rt);
- ro_pmtu->ro_rt = (struct rtentry *)NULL;
+ ro_pmtu->ro_rt = NULL;
}
if (ro_pmtu->ro_rt == 0) {
bzero(ro_pmtu, sizeof(*ro_pmtu));