aboutsummaryrefslogtreecommitdiff
path: root/tcp_input.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2015-08-29 09:12:35 +0200
committerJason Wang <jasowang@redhat.com>2015-11-12 13:48:36 +0800
commitf75c02cc3f8bd711ddbecaf57aee9b30b50f28c7 (patch)
tree8bf382825e81cf1a74aaa45ecb96b26cd23d5968 /tcp_input.c
parentc91a2b71b4fd62dfa8ca98b217334b946aa69ee3 (diff)
downloadslirp-2.5.1.1.zip
slirp-2.5.1.1.tar.gz
slirp-2.5.1.1.tar.bz2
slirp: Fix type casts and format strings in debug codev2.5.1.1v2.5.1v2.5.0-rc4v2.5.0-rc3v2.5.0-rc2v2.5.0-rc1v2.5.0-rc0v2.5.0
Casting pointers to long won't work on 64 bit Windows. It is not needed with the right format strings. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'tcp_input.c')
-rw-r--r--tcp_input.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/tcp_input.c b/tcp_input.c
index af46e36..a21b17a 100644
--- a/tcp_input.c
+++ b/tcp_input.c
@@ -232,8 +232,7 @@ void tcp_input(struct mbuf *m, int iphlen, struct socket *inso)
Slirp *slirp;
DEBUG_CALL("tcp_input");
- DEBUG_ARGS((dfd, " m = %8lx iphlen = %2d inso = %lx\n", (long)m, iphlen,
- (long)inso));
+ DEBUG_ARGS((dfd, " m = %p iphlen = %2d inso = %p\n", m, iphlen, inso));
/*
* If called with m == 0, then we're continuing the connect
@@ -920,8 +919,7 @@ findso:
if (SEQ_LEQ(ti->ti_ack, tp->snd_una)) {
if (ti->ti_len == 0 && tiwin == tp->snd_wnd) {
- DEBUG_MISC(
- (dfd, " dup ack m = %lx so = %lx\n", (long)m, (long)so));
+ DEBUG_MISC((dfd, " dup ack m = %p so = %p\n", m, so));
/*
* If we have outstanding data (other than
* a window probe), this is a completely
@@ -1295,7 +1293,7 @@ static void tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt,
int opt, optlen;
DEBUG_CALL("tcp_dooptions");
- DEBUG_ARGS((dfd, " tp = %lx cnt=%i\n", (long)tp, cnt));
+ DEBUG_ARGS((dfd, " tp = %p cnt=%i\n", tp, cnt));
for (; cnt > 0; cnt -= optlen, cp += optlen) {
opt = cp[0];
@@ -1372,7 +1370,7 @@ static void tcp_xmit_timer(register struct tcpcb *tp, int rtt)
register short delta;
DEBUG_CALL("tcp_xmit_timer");
- DEBUG_ARG("tp = %lx", (long)tp);
+ DEBUG_ARG("tp = %p", tp);
DEBUG_ARG("rtt = %d", rtt);
if (tp->t_srtt != 0) {
@@ -1459,7 +1457,7 @@ int tcp_mss(struct tcpcb *tp, u_int offer)
int mss;
DEBUG_CALL("tcp_mss");
- DEBUG_ARG("tp = %lx", (long)tp);
+ DEBUG_ARG("tp = %p", tp);
DEBUG_ARG("offer = %d", offer);
mss = min(IF_MTU, IF_MRU) - sizeof(struct tcpiphdr);