aboutsummaryrefslogtreecommitdiffstats
path: root/cbtree.h
diff options
context:
space:
mode:
Diffstat (limited to 'cbtree.h')
-rw-r--r--cbtree.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/cbtree.h b/cbtree.h
index a04a312c3f..0be14fb7ee 100644
--- a/cbtree.h
+++ b/cbtree.h
@@ -37,16 +37,16 @@ enum cb_next {
CB_BREAK = 1
};
-#define CBTREE_INIT { .root = NULL }
+#define CBTREE_INIT { 0 }
static inline void cb_init(struct cb_tree *t)
{
- t->root = NULL;
+ struct cb_tree blank = CBTREE_INIT;
+ memcpy(t, &blank, sizeof(*t));
}
struct cb_node *cb_lookup(struct cb_tree *, const uint8_t *k, size_t klen);
struct cb_node *cb_insert(struct cb_tree *, struct cb_node *, size_t klen);
-struct cb_node *cb_unlink(struct cb_tree *t, const uint8_t *k, size_t klen);
typedef enum cb_next (*cb_iter)(struct cb_node *, void *arg);