projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
check_rsa() is broken, I don't know why, just remove it for now.
[tinc]
/
lib
/
avl_tree.c
diff --git
a/lib/avl_tree.c
b/lib/avl_tree.c
index
9b7a06c
..
a4f0051
100644
(file)
--- a/
lib/avl_tree.c
+++ b/
lib/avl_tree.c
@@
-29,7
+29,7
@@
library for inclusion into tinc (http://tinc.nl.linux.org/) by
Guus Sliepen <guus@sliepen.warande.net>.
library for inclusion into tinc (http://tinc.nl.linux.org/) by
Guus Sliepen <guus@sliepen.warande.net>.
- $Id: avl_tree.c,v 1.1.2.
6 2001/02/20 21:53:18 wsl
Exp $
+ $Id: avl_tree.c,v 1.1.2.
8 2002/02/10 21:57:51 guus
Exp $
*/
#include <stdio.h>
*/
#include <stdio.h>
@@
-430,7
+430,7
@@
avl_node_t *avl_insert(avl_tree_t *tree, void *data)
new->data = data;
avl_insert_after(tree, closest, new);
break;
new->data = data;
avl_insert_after(tree, closest, new);
break;
-
case 0
:
+
default
:
return NULL;
}
}
return NULL;
}
}
@@
-597,6
+597,15
@@
void avl_unlink_node(avl_tree_t *tree, avl_node_t *node)
}
avl_rebalance(tree, balnode);
}
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)
}
void avl_delete_node(avl_tree_t *tree, avl_node_t *node)