summaryrefslogtreecommitdiff
path: root/src/libstddjb/bufalloc_init.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-07-31 12:21:48 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-07-31 12:21:48 +0000
commita28a432f7823cf2173d6f1e54c99438503d3174f (patch)
treec278f7343cd2cd40f3071a25c10c5da01484a0bc /src/libstddjb/bufalloc_init.c
parent3c5f5aea891c85dbdfc4d287d7ebf2bb813d6405 (diff)
downloadskalibs-a28a432f7823cf2173d6f1e54c99438503d3174f.tar.xz
Make cbuffer_?peek take a const; make *_init not leak when misused
Diffstat (limited to 'src/libstddjb/bufalloc_init.c')
-rw-r--r--src/libstddjb/bufalloc_init.c3
1 files changed, 1 insertions, 2 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 ;