projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a bug that could prevent tinc from starting correctly on Windows.
[tinc]
/
src
/
avl_tree.c
diff --git
a/src/avl_tree.c
b/src/avl_tree.c
index
4b23756
..
22d7ff5
100644
(file)
--- a/
src/avl_tree.c
+++ b/
src/avl_tree.c
@@
-168,14
+168,12
@@
static void avl_rebalance(avl_tree_t *tree, avl_node_t *node)
child->right->parent = child;
gchild->right = node;
child->right->parent = child;
gchild->right = node;
- if(gchild->right)
- gchild->right->parent = gchild;
+ gchild->right->parent = gchild;
gchild->left = child;
gchild->left = child;
- if(gchild->left)
- gchild->left->parent = gchild;
- *superparent = gchild;
+ gchild->left->parent = gchild;
+ *superparent = gchild;
gchild->parent = parent;
#ifdef AVL_COUNT
node->count = AVL_CALC_COUNT(node);
gchild->parent = parent;
#ifdef AVL_COUNT
node->count = AVL_CALC_COUNT(node);
@@
-224,8
+222,7
@@
static void avl_rebalance(avl_tree_t *tree, avl_node_t *node)
child->left->parent = child;
gchild->left = node;
child->left->parent = child;
gchild->left = node;
- if(gchild->left)
- gchild->left->parent = gchild;
+ gchild->left->parent = gchild;
gchild->right = child;
gchild->right->parent = gchild;
gchild->right = child;
gchild->right->parent = gchild;