diff options
Diffstat (limited to 'src/libstddjb')
-rw-r--r-- | src/libstddjb/bufalloc_init.c | 3 | ||||
-rw-r--r-- | src/libstddjb/cbuffer_rpeek.c | 2 | ||||
-rw-r--r-- | src/libstddjb/cbuffer_wpeek.c | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/libstddjb/bufalloc_init.c b/src/libstddjb/bufalloc_init.c index 6826193..0d97df9 100644 --- a/src/libstddjb/bufalloc_init.c +++ b/src/libstddjb/bufalloc_init.c @@ -1,11 +1,10 @@ /* ISC license. */ -#include <skalibs/stralloc.h> #include <skalibs/bufalloc.h> void bufalloc_init (bufalloc *ba, ssize_t (*op)(int, char const *, size_t), int fd) { - ba->x = stralloc_zero ; + ba->x.len = 0 ; ba->op = op ; ba->fd = fd ; ba->p = 0 ; diff --git a/src/libstddjb/cbuffer_rpeek.c b/src/libstddjb/cbuffer_rpeek.c index 58cb207..8592d00 100644 --- a/src/libstddjb/cbuffer_rpeek.c +++ b/src/libstddjb/cbuffer_rpeek.c @@ -3,7 +3,7 @@ #include <sys/uio.h> #include <skalibs/cbuffer.h> -void cbuffer_rpeek (cbuffer_t *b, struct iovec *v) +void cbuffer_rpeek (cbuffer_t const *b, struct iovec *v) { v[0].iov_base = b->x + b->p ; if (b->n >= b->p) diff --git a/src/libstddjb/cbuffer_wpeek.c b/src/libstddjb/cbuffer_wpeek.c index 8b6b586..d023294 100644 --- a/src/libstddjb/cbuffer_wpeek.c +++ b/src/libstddjb/cbuffer_wpeek.c @@ -3,7 +3,7 @@ #include <sys/uio.h> #include <skalibs/cbuffer.h> -void cbuffer_wpeek (cbuffer_t *b, struct iovec *v) +void cbuffer_wpeek (cbuffer_t const *b, struct iovec *v) { size_t last = (b->a - 1 + b->p) % b->a ; v[0].iov_base = b->x + b->n ; |