From 49d8fa1058aaf23c29e074b2314492ae40d2f557 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 21 Feb 2017 12:05:07 +0000 Subject: Types change: big pass on libstddjb and libunixonacid libdatastruct still missing, library still not functional --- src/libstddjb/vbaprintf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/libstddjb/vbaprintf.c') diff --git a/src/libstddjb/vbaprintf.c b/src/libstddjb/vbaprintf.c index 1c23e8c..38bd331 100644 --- a/src/libstddjb/vbaprintf.c +++ b/src/libstddjb/vbaprintf.c @@ -1,8 +1,7 @@ /* ISC license. */ -#include -#include #include +#include #include #include #include @@ -17,8 +16,8 @@ int vbaprintf (bufalloc *ba, char const *format, va_list args) va_end(ugly) ; } if (r < 0) return r ; - if (!stralloc_readyplus(&ba->x, (size_t)r + 1)) return -1 ; - r = vsnprintf(ba->x.s + ba->x.len, (size_t)r + 1, format, args) ; + if (!stralloc_readyplus(&ba->x, r + 1)) return -1 ; + r = vsnprintf(ba->x.s + ba->x.len, r + 1, format, args) ; if (r > 0) ba->x.len += r ; return r ; } -- cgit v1.2.3