diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/utils/avl.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/utils/avl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/luatexdir/utils/avl.c b/Build/source/texk/web2c/luatexdir/utils/avl.c index 79c746cd10d..0241ebd3e6b 100644 --- a/Build/source/texk/web2c/luatexdir/utils/avl.c +++ b/Build/source/texk/web2c/luatexdir/utils/avl.c @@ -216,6 +216,8 @@ void *avl_delete(struct avl_table *tree, const void *item) struct avl_node *p; /* Traverses tree to find node to delete. */ int cmp; /* Result of comparison between |item| and |p|. */ + void *res; + assert(tree != NULL && item != NULL); k = 0; @@ -231,7 +233,7 @@ void *avl_delete(struct avl_table *tree, const void *item) if (p == NULL) return NULL; } - item = p->avl_data; + res = p->avl_data; if (p->avl_link[1] == NULL) pa[k - 1]->avl_link[da[k - 1]] = p->avl_link[0]; @@ -347,7 +349,7 @@ void *avl_delete(struct avl_table *tree, const void *item) tree->avl_count--; tree->avl_generation++; - return (void *) item; + return res; } /* Refreshes the stack of parent pointers in |trav| |