about summary refs log tree commit diff
path: root/src/libdatastruct
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/libdatastruct
parent2050f92e2da662aa9a27a67577228a24b1566bbd (diff)
downloadskalibs-0b62835eeb951fd2bf967e7fdb4194649bdddd06.tar.gz
skalibs-0b62835eeb951fd2bf967e7fdb4194649bdddd06.tar.xz
skalibs-0b62835eeb951fd2bf967e7fdb4194649bdddd06.zip
Revert initializer optimization (buggy when first realloc'ing!)
Diffstat (limited to 'src/libdatastruct')
-rw-r--r--src/libdatastruct/gensetdyn_init.c6
1 files changed, 3 insertions, 3 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 ;