Re: iovecs don't print right
- From: nobody+cplusplus <nobody@xxxxxxxxxxxxxxxx>
- Date: Sat, 05 Jul 2008 14:41:02 +0930
nobody+cplusplus wrote:
Stephane CHAZELAS wrote:
2008-07-05, 03:51(+09), nobody+cplusplus:
[...]
printf ("len %d, %d: %s \n", (int) iov[i].iov_len, i, (char *) \[...]
iov[i].iov_base );
What wrong am i doing here? :/[...]
You're using printf("%s") on something that is not a
zero-terminated string.
FYI, hence (void*)->(char*) for iov[i].iov_base
anything else?
OK somehow using printf("%.<precision>s",..) does the trick (as the max
characters is 16, <precision> = 16. But this is a ugly hack at best. Is
there better way of doing it?
--
thanks
.
- Follow-Ups:
- Re: iovecs don't print right
- From: Jens Thoms Toerring
- Re: iovecs don't print right
- References:
- iovecs don't print right
- From: nobody+cplusplus
- Re: iovecs don't print right
- From: Stephane CHAZELAS
- Re: iovecs don't print right
- From: nobody+cplusplus
- iovecs don't print right
- Prev by Date: Re: iovecs don't print right
- Next by Date: Traceroute using IP option
- Previous by thread: Re: iovecs don't print right
- Next by thread: Re: iovecs don't print right
- Index(es):