diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-25 15:52:18 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-01-25 15:52:18 +0000 |
| commit | 00c9cb1b22cc17c4db573e0e613a5f116ff0092e (patch) | |
| tree | 53178b2c52c6e97c6193f73378f3c5e5a781a914 /src/libstddjb/ip4_scanlist.c | |
| parent | 2746b131aa482ac17c94bc6b82e58dbcc1b752cf (diff) | |
| download | skalibs-00c9cb1b22cc17c4db573e0e613a5f116ff0092e.tar.gz | |
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.
Diffstat (limited to 'src/libstddjb/ip4_scanlist.c')
| -rw-r--r-- | src/libstddjb/ip4_scanlist.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstddjb/ip4_scanlist.c b/src/libstddjb/ip4_scanlist.c index f1e3ccc..edc2949 100644 --- a/src/libstddjb/ip4_scanlist.c +++ b/src/libstddjb/ip4_scanlist.c @@ -1,14 +1,15 @@ /* ISC license. */ +#include <sys/types.h> #include <skalibs/bytestr.h> #include <skalibs/fmtscan.h> -unsigned int ip4_scanlist (char *out, unsigned int max, char const *s, unsigned int *num) +size_t ip4_scanlist (char *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_scan(s + w, out + (n << 2)) ; + register size_t i = ip4_scan(s + w, out + (n << 2)) ; if (!i) break ; w += i ; while (byte_chr(",:; \t\r\n", 7, s[w]) < 7) w++ ; |
