From 0b62835eeb951fd2bf967e7fdb4194649bdddd06 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 14 Aug 2017 18:35:05 +0000 Subject: Revert initializer optimization (buggy when first realloc'ing!) --- src/libstddjb/bufalloc_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstddjb/bufalloc_init.c') 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 #include 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 ; -- cgit v1.2.3