From 00c9cb1b22cc17c4db573e0e613a5f116ff0092e Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 25 Jan 2017 15:52:18 +0000 Subject: More work on the types. This commit builds but has errors. Rework src/headers entirely: build skalibs/types.h Convert skalibs/fmtscan.h types. Propagate changes until it builds. There are a lot of incompatible pointer issues remaining, those will be fixed with the buffer overhaul. --- src/libstddjb/ip4_scanlist_u32.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libstddjb/ip4_scanlist_u32.c') diff --git a/src/libstddjb/ip4_scanlist_u32.c b/src/libstddjb/ip4_scanlist_u32.c index 26a4e38..10c24cf 100644 --- a/src/libstddjb/ip4_scanlist_u32.c +++ b/src/libstddjb/ip4_scanlist_u32.c @@ -1,15 +1,17 @@ /* ISC license. */ +#include +#include #include #include #include -unsigned int ip4_scanlist_u32 (uint32 *out, unsigned int max, char const *s, unsigned int *num) +size_t ip4_scanlist_u32 (uint32_t *out, size_t max, char const *s, size_t *num) { - unsigned int n = 0, w = 0 ; + size_t n = 0, w = 0 ; for (; s[w] && (n < max) ; n++) { - register unsigned int i = ip4_scanu32(s + w, out + n) ; + register size_t i = ip4_scanu32(s + w, out + n) ; if (!i) break ; w += i ; while (byte_chr(",:; \t\r\n", 7, s[w]) < 7) w++ ; -- cgit v1.3.1