summaryrefslogtreecommitdiff
path: root/src/libbiguint/bu_fmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libbiguint/bu_fmt.c')
-rw-r--r--src/libbiguint/bu_fmt.c8
1 files changed, 5 insertions, 3 deletions
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 <sys/types.h>
+#include <stdint.h>
#include <skalibs/uint32.h>
#include <skalibs/bytestr.h>
#include <skalibs/biguint.h>
-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 ;