From 9748d1f21b8a1c8c6f14ef9384c0e4fdb2d41585 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Sat, 28 Mar 2009 08:00:09 +0100 Subject: [PATCH] Fix trace prints for buffer ptrs --- src/tcpip.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tcpip.c b/src/tcpip.c index 97461da..ffbcf44 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -1050,8 +1050,8 @@ int tcpip_get(COMSTACK h, char **buf, int *bufsize) TRC(fprintf(stderr, "tcpip_get: bufsize=%d\n", *bufsize)); if (sp->altlen) /* switch buffers */ { - TRC(fprintf(stderr, " %d bytes in altbuf (0x%x)\n", sp->altlen, - (unsigned) sp->altbuf)); + TRC(fprintf(stderr, " %d bytes in altbuf (%p)\n", sp->altlen, + sp->altbuf)); tmpc = *buf; tmpi = *bufsize; *buf = sp->altbuf; @@ -1156,8 +1156,8 @@ int tcpip_get(COMSTACK h, char **buf, int *bufsize) h->cerrno = CSYSERR; return -1; } - TRC(fprintf(stderr, " Moving %d bytes to altbuf(0x%x)\n", tomove, - (unsigned) sp->altbuf)); + TRC(fprintf(stderr, " Moving %d bytes to altbuf(%p)\n", tomove, + sp->altbuf)); memcpy(sp->altbuf, *buf + berlen, sp->altlen = tomove); } if (berlen < CS_TCPIP_BUFCHUNK - 1) @@ -1181,8 +1181,8 @@ int ssl_get(COMSTACK h, char **buf, int *bufsize) TRC(fprintf(stderr, "ssl_get: bufsize=%d\n", *bufsize)); if (sp->altlen) /* switch buffers */ { - TRC(fprintf(stderr, " %d bytes in altbuf (0x%x)\n", sp->altlen, - (unsigned) sp->altbuf)); + TRC(fprintf(stderr, " %d bytes in altbuf (%p)\n", sp->altlen, + sp->altbuf)); tmpc = *buf; tmpi = *bufsize; *buf = sp->altbuf; @@ -1240,8 +1240,8 @@ int ssl_get(COMSTACK h, char **buf, int *bufsize) } else if (sp->altsize < req) if (!(sp->altbuf =(char *)xrealloc(sp->altbuf, sp->altsize = req))) return -1; - TRC(fprintf(stderr, " Moving %d bytes to altbuf(0x%x)\n", tomove, - (unsigned) sp->altbuf)); + TRC(fprintf(stderr, " Moving %d bytes to altbuf(%p)\n", tomove, + sp->altbuf)); memcpy(sp->altbuf, *buf + berlen, sp->altlen = tomove); } if (berlen < CS_TCPIP_BUFCHUNK - 1) -- 1.7.10.4