diff options
author | Stefan Weil <sw@weilnetz.de> | 2015-08-29 09:12:35 +0200 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2015-11-12 13:48:36 +0800 |
commit | f75c02cc3f8bd711ddbecaf57aee9b30b50f28c7 (patch) | |
tree | 8bf382825e81cf1a74aaa45ecb96b26cd23d5968 /socket.c | |
parent | c91a2b71b4fd62dfa8ca98b217334b946aa69ee3 (diff) | |
download | slirp-da3e617e007b18a58d0e5d6937b777c20aea2fcc.zip slirp-da3e617e007b18a58d0e5d6937b777c20aea2fcc.tar.gz slirp-da3e617e007b18a58d0e5d6937b777c20aea2fcc.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 'socket.c')
-rw-r--r-- | socket.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -85,7 +85,7 @@ size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np) int mss = so->so_tcpcb->t_maxseg; DEBUG_CALL("sopreprbuf"); - DEBUG_ARG("so = %lx", (long)so); + DEBUG_ARG("so = %p", so); if (len <= 0) return 0; @@ -149,7 +149,7 @@ int soread(struct socket *so) struct iovec iov[2]; DEBUG_CALL("soread"); - DEBUG_ARG("so = %lx", (long)so); + DEBUG_ARG("so = %p", so); /* * No need to check if there's enough room to read. @@ -211,7 +211,7 @@ int soreadbuf(struct socket *so, const char *buf, int size) struct iovec iov[2]; DEBUG_CALL("soreadbuf"); - DEBUG_ARG("so = %lx", (long)so); + DEBUG_ARG("so = %p", so); /* * No need to check if there's enough room to read. @@ -258,7 +258,7 @@ void sorecvoob(struct socket *so) struct tcpcb *tp = sototcpcb(so); DEBUG_CALL("sorecvoob"); - DEBUG_ARG("so = %lx", (long)so); + DEBUG_ARG("so = %p", so); /* * We take a guess at how much urgent data has arrived. @@ -287,7 +287,7 @@ int sosendoob(struct socket *so) int n, len; DEBUG_CALL("sosendoob"); - DEBUG_ARG("so = %lx", (long)so); + DEBUG_ARG("so = %p", so); DEBUG_ARG("sb->sb_cc = %d", sb->sb_cc); if (so->so_urgc > 2048) @@ -351,7 +351,7 @@ int sowrite(struct socket *so) struct iovec iov[2]; DEBUG_CALL("sowrite"); - DEBUG_ARG("so = %lx", (long)so); + DEBUG_ARG("so = %p", so); if (so->so_urgc) { sosendoob(so); @@ -444,7 +444,7 @@ void sorecvfrom(struct socket *so) socklen_t addrlen = sizeof(struct sockaddr_in); DEBUG_CALL("sorecvfrom"); - DEBUG_ARG("so = %lx", (long)so); + DEBUG_ARG("so = %p", so); if (so->so_type == IPPROTO_ICMP) { /* This is a "ping" reply */ char buff[256]; @@ -548,8 +548,8 @@ int sosendto(struct socket *so, struct mbuf *m) struct sockaddr_in addr; DEBUG_CALL("sosendto"); - DEBUG_ARG("so = %lx", (long)so); - DEBUG_ARG("m = %lx", (long)m); + DEBUG_ARG("so = %p", so); + DEBUG_ARG("m = %p", m); addr.sin_family = AF_INET; if ((so->so_faddr.s_addr & slirp->vnetwork_mask.s_addr) == |