summaryrefslogtreecommitdiff
path: root/src/libstddjb/buffer_getall.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/buffer_getall.c')
-rw-r--r--src/libstddjb/buffer_getall.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstddjb/buffer_getall.c b/src/libstddjb/buffer_getall.c
index dc0e115..dca9e3b 100644
--- a/src/libstddjb/buffer_getall.c
+++ b/src/libstddjb/buffer_getall.c
@@ -1,15 +1,16 @@
/* ISC license. */
+#include <sys/types.h>
#include <errno.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/buffer.h>
-int buffer_getall (buffer *b, char *buf, unsigned int len, unsigned int *w)
+int buffer_getall (buffer *b, char *buf, size_t len, size_t *w)
{
if (*w > len) return (errno = EINVAL, -1) ;
for (;;)
{
- register int r ;
+ ssize_t r ;
*w += buffer_getnofill(b, buf + *w, len - *w) ;
if (*w >= len) break ;
r = sanitize_read(buffer_fill(b)) ;