diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 2002-08-28 15:43:04 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 2002-08-28 15:43:04 +0000 |
commit | c940304939f4c564d83fb87d12af6559d9ccaa49 (patch) | |
tree | 0ed9381dc2c5b67e3df01614aa26f937a8ce9862 /sys/netinet/tcp_subr.c | |
parent | 3f526e41a355a9df6ca3f1c0e2947365f380cbf0 (diff) |
Fix a problem where passing NULL as a pointer with varargs does not promote
NULL to full 64 bits on a 64 bit address system. Soultion is to add a
(void *) cast before NULL. This makes a 64 bit MIPS kernel work and will
probably help future 64 bit ports as well.
OK from art@
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 0224280f9e1..ec6a6d9e0e1 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.64 2002/06/09 16:26:11 itojun Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.65 2002/08/28 15:43:03 pefo Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -454,9 +454,8 @@ tcp_respond(tp, template, m, ack, seq, flags) th->th_sum = in_cksum(m, tlen); ((struct ip *)ti)->ip_len = tlen; ((struct ip *)ti)->ip_ttl = ip_defttl; - ip_output(m, NULL, ro, ip_mtudisc ? IP_MTUDISC : 0, NULL, - tp ? tp->t_inpcb : NULL); - break; + ip_output(m, (void *)NULL, ro, ip_mtudisc ? IP_MTUDISC : 0, + (void *)NULL, tp ? tp->t_inpcb : (void *)NULL); } } |