summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libdatastruct/gensetdyn_init.c6
-rw-r--r--src/libstddjb/bufalloc_init.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libdatastruct/gensetdyn_init.c b/src/libdatastruct/gensetdyn_init.c
index bdf4e09..744c63f 100644
--- a/src/libdatastruct/gensetdyn_init.c
+++ b/src/libdatastruct/gensetdyn_init.c
@@ -1,13 +1,13 @@
/* ISC license. */
-#include <stdint.h>
+#include <skalibs/stralloc.h>
#include <skalibs/genalloc.h>
#include <skalibs/gensetdyn.h>
void gensetdyn_init (gensetdyn *g, uint32_t esize, uint32_t base, uint32_t fracnum, uint32_t fracden)
{
- g->storage.len = 0 ;
- genalloc_setlen(uint32_t, &g->freelist, 0) ;
+ g->storage = stralloc_zero ;
+ g->freelist = genalloc_zero ;
g->esize = esize ;
g->base = base ;
g->fracnum = fracnum ;
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 ;