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 /tcp_subr.c | |
parent | c91a2b71b4fd62dfa8ca98b217334b946aa69ee3 (diff) | |
download | slirp-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_subr.c')
-rw-r--r-- | tcp_subr.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -226,7 +226,7 @@ struct tcpcb *tcp_newtcpcb(struct socket *so) struct tcpcb *tcp_drop(struct tcpcb *tp, int err) { DEBUG_CALL("tcp_drop"); - DEBUG_ARG("tp = %lx", (long)tp); + DEBUG_ARG("tp = %p", tp); DEBUG_ARG("errno = %d", errno); if (TCPS_HAVERCVDSYN(tp->t_state)) { @@ -250,7 +250,7 @@ struct tcpcb *tcp_close(struct tcpcb *tp) register struct mbuf *m; DEBUG_CALL("tcp_close"); - DEBUG_ARG("tp = %lx", (long)tp); + DEBUG_ARG("tp = %p", tp); /* free the reassembly queue, if any */ t = tcpfrag_list_first(tp); @@ -289,7 +289,7 @@ struct tcpcb *tcp_close(struct tcpcb *tp) void tcp_sockclosed(struct tcpcb *tp) { DEBUG_CALL("tcp_sockclosed"); - DEBUG_ARG("tp = %lx", (long)tp); + DEBUG_ARG("tp = %p", tp); switch (tp->t_state) { case TCPS_CLOSED: @@ -328,7 +328,7 @@ int tcp_fconnect(struct socket *so) int ret = 0; DEBUG_CALL("tcp_fconnect"); - DEBUG_ARG("so = %lx", (long)so); + DEBUG_ARG("so = %p", so); if ((ret = so->s = qemu_socket(AF_INET, SOCK_STREAM, 0)) >= 0) { int opt, s = so->s; @@ -392,7 +392,7 @@ void tcp_connect(struct socket *inso) int s, opt; DEBUG_CALL("tcp_connect"); - DEBUG_ARG("inso = %lx", (long)inso); + DEBUG_ARG("inso = %p", inso); /* * If it's an SS_ACCEPTONCE socket, no need to socreate() @@ -560,8 +560,8 @@ int tcp_emu(struct socket *so, struct mbuf *m) char *bptr; DEBUG_CALL("tcp_emu"); - DEBUG_ARG("so = %lx", (long)so); - DEBUG_ARG("m = %lx", (long)m); + DEBUG_ARG("so = %p", so); + DEBUG_ARG("m = %p", m); switch (so->so_emu) { int x, i; @@ -892,7 +892,7 @@ int tcp_ctl(struct socket *so) int do_pty; DEBUG_CALL("tcp_ctl"); - DEBUG_ARG("so = %lx", (long)so); + DEBUG_ARG("so = %p", so); if (so->so_faddr.s_addr != slirp->vhost_addr.s_addr) { /* Check if it's pty_exec */ |