summaryrefslogtreecommitdiff
path: root/src/libstddjb
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-08-14 18:35:05 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-08-14 18:35:05 +0000
commit0b62835eeb951fd2bf967e7fdb4194649bdddd06 (patch)
tree8aa5a16d3a985642425027ace310319e1086e513 /src/libstddjb
parent2050f92e2da662aa9a27a67577228a24b1566bbd (diff)
downloadskalibs-0b62835eeb951fd2bf967e7fdb4194649bdddd06.tar.xz
Revert initializer optimization (buggy when first realloc'ing!)
Diffstat (limited to 'src/libstddjb')
-rw-r--r--src/libstddjb/bufalloc_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstddjb/bufalloc_init.c b/src/libstddjb/bufalloc_init.c
index 0d97df9..6826193 100644
--- a/src/libstddjb/bufalloc_init.c
+++ b/src/libstddjb/bufalloc_init.c
@@ -1,10 +1,11 @@
/* 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.len = 0 ;
+ ba->x = stralloc_zero ;
ba->op = op ;
ba->fd = fd ;
ba->p = 0 ;