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/siovec_gather.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/libstddjb/siovec_gather.c') diff --git a/src/libstddjb/siovec_gather.c b/src/libstddjb/siovec_gather.c index 23ae28a..b5fcbb7 100644 --- a/src/libstddjb/siovec_gather.c +++ b/src/libstddjb/siovec_gather.c @@ -1,17 +1,19 @@ /* ISC license. */ -#include +#include +#include +#include #include -unsigned int siovec_gather (siovec_t const *v, unsigned int n, char *s, unsigned int max) +size_t siovec_gather (struct iovec const *v, unsigned int n, char *s, size_t max) { - unsigned int w = 0 ; - register unsigned int i = 0 ; + size_t w = 0 ; + unsigned int i = 0 ; for (; i < n && w < max ; i++) { - register unsigned int len = v[i].len ; + size_t len = v[i].iov_len ; if ((w + len) > max) len = max - w ; - byte_copy(s + w, len, v[i].s) ; + memmove(s + w, v[i].iov_base, len) ; w += len ; } return w ; -- cgit v1.2.3