projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Gettext 1.11.5 compatibility.
[tinc]
/
lib
/
avl_tree.c
diff --git
a/lib/avl_tree.c
b/lib/avl_tree.c
index
a07f123
..
8ec680b
100644
(file)
--- 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
/*
avl_tree.c -- avl_ tree and linked list convenience
Copyright (C) 1998 Michael H. Buselli
- 2000,2001 Ivo Timmermans <i
timmermans@bigfoot.com
>,
- 2000,2001 Guus Sliepen <guus@sliepen.
warande.net
>
+ 2000,2001 Ivo Timmermans <i
vo@o2w.nl
>,
+ 2000,2001 Guus Sliepen <guus@sliepen.
eu.org
>
2000,2001 Wessel Dankers <wsl@nl.linux.org>
This program is free software; you can redistribute it and/or modify
2000,2001 Wessel Dankers <wsl@nl.linux.org>
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
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.
warande.net
>.
+ Guus Sliepen <guus@sliepen.
eu.org
>.
- $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 <stdio.h>
*/
#include <stdio.h>
@@
-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)