diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-04 00:02:38 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-03-04 00:02:38 +0100 |
commit | c6e1778d4429032087b36fb0dde2ae2fecf53b4a (patch) | |
tree | 04e0f830cf5bfc8f4c3a4b72d62bd126e45d2f69 /utils.c | |
parent | 9fe20c8cbc4249c13d6f305adc91f4bc695f7c23 (diff) |
simplify vlist, move avl key handling to vlist_add()
Diffstat (limited to 'utils.c')
-rw-r--r-- | utils.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -9,10 +9,8 @@ avl_strcmp(const void *k1, const void *k2, void *ptr) } void -__vlist_init(struct vlist_tree *tree, avl_tree_comp cmp, - vlist_update_cb update, int offset) +vlist_init(struct vlist_tree *tree, avl_tree_comp cmp, vlist_update_cb update) { - tree->key_offset = offset; tree->update = update; tree->version = 1; @@ -28,11 +26,10 @@ vlist_delete(struct vlist_tree *tree, struct vlist_node *node) } void -vlist_add(struct vlist_tree *tree, struct vlist_node *node) +vlist_add(struct vlist_tree *tree, struct vlist_node *node, void *key) { struct vlist_node *old_node = NULL; struct avl_node *anode; - void *key = (char *) node + tree->key_offset; node->avl.key = key; node->version = tree->version; |