X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=lib%2Favl_tree.c;h=8ec680bed6599445bf021d270bc4d11118807949;hp=a07f123f9fb3cf7ee814230fcd13bf84a74d3f7c;hb=627f7c22b447bd464b536cd016278545674df93d;hpb=099cc867c1a0831add7f1b4046f22ad6bfa5a1ef diff --git a/lib/avl_tree.c b/lib/avl_tree.c index a07f123f..8ec680be 100644 --- a/lib/avl_tree.c +++ b/lib/avl_tree.c @@ -1,8 +1,8 @@ /* avl_tree.c -- avl_ tree and linked list convenience Copyright (C) 1998 Michael H. Buselli - 2000,2001 Ivo Timmermans , - 2000,2001 Guus Sliepen + 2000,2001 Ivo Timmermans , + 2000,2001 Guus Sliepen 2000,2001 Wessel Dankers This program is free software; you can redistribute it and/or modify @@ -27,9 +27,9 @@ Cleaned up and incorporated some of the ideas from the red-black tree library for inclusion into tinc (http://tinc.nl.linux.org/) by - Guus Sliepen . + Guus Sliepen . - $Id: avl_tree.c,v 1.1.2.7 2001/02/27 16:50:29 guus Exp $ + $Id: avl_tree.c,v 1.1.2.9 2002/06/21 10:11:11 guus Exp $ */ #include @@ -597,6 +597,15 @@ void avl_unlink_node(avl_tree_t *tree, avl_node_t *node) } avl_rebalance(tree, balnode); + + node->next = node->prev = node->parent = node->left = node->right = NULL; + +#ifdef AVL_COUNT + node->count = 0; +#endif +#ifdef AVL_DEPTH + node->depth = 0; +#endif } void avl_delete_node(avl_tree_t *tree, avl_node_t *node)