From fdffefb8032922ce7ffe4c00816072a8ff2148fc Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 17 Feb 2017 22:30:53 +0000 Subject: More types changes New disize Add size_t to the autotypes list Delete redundant and replace-libc files dev_t/ino_t pass Big size_t pass More things missing, still not operational yet --- src/libstddjb/cbuffer_wpeek.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/libstddjb/cbuffer_wpeek.c') diff --git a/src/libstddjb/cbuffer_wpeek.c b/src/libstddjb/cbuffer_wpeek.c index a2c6a63..a1e502e 100644 --- a/src/libstddjb/cbuffer_wpeek.c +++ b/src/libstddjb/cbuffer_wpeek.c @@ -1,22 +1,23 @@ /* ISC license. */ +#include +#include #include -#include -void cbuffer_wpeek (cbuffer_t *b, siovec_t *v) +void cbuffer_wpeek (cbuffer_t *b, struct iovec *v) { - unsigned int last = (b->a - 1 + b->p) % b->a ; - v[0].s = b->x + b->n ; + size_t last = (b->a - 1 + b->p) % b->a ; + v[0].iov_base = b->x + b->n ; if (last >= b->n) { - v[0].len = last - b->n ; - v[1].s = 0 ; - v[1].len = 0 ; + v[0].iov_len = last - b->n ; + v[1].iov_base = 0 ; + v[1].iov_len = 0 ; } else { - v[0].len = b->a - b->n ; - v[1].s = b->x ; - v[1].len = last ; + v[0].iov_len = b->a - b->n ; + v[1].iov_base = b->x ; + v[1].iov_len = last ; } } -- cgit v1.2.3