From 05db4ba46ae1ca6143bb9b432d1e05e69eddd263 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 21 Jan 2017 14:51:28 +0000 Subject: Types fix, start: preparation and libbiguint --- src/libbiguint/bu_fmt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/libbiguint/bu_fmt.c') diff --git a/src/libbiguint/bu_fmt.c b/src/libbiguint/bu_fmt.c index 31fa706..8e5dda1 100644 --- a/src/libbiguint/bu_fmt.c +++ b/src/libbiguint/bu_fmt.c @@ -1,16 +1,18 @@ /* ISC license. */ +#include +#include #include #include #include -unsigned int bu_fmt (char *s, uint32 const *x, unsigned int n) +size_t bu_fmt (char *s, uint32_t const *x, unsigned int n) { - unsigned int len = 0 ; + size_t len = 0 ; while (n--) { char fmt[8] ; - unsigned int i = uint32_xfmt(fmt, x[n]) ; + size_t i = uint32_xfmt(fmt, x[n]) ; byte_copy(s+len, 8-i, "00000000") ; byte_copy(s+len+8-i, i, fmt) ; len += 8 ; -- cgit v1.2.3