X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_avltree.c;h=fcfbb9453c74e641d5d6c2909fdb430914884de5;hb=2bda2a5648c87a2c5b8304238cd80ff17984c5cd;hp=58b8b8479128b6a9b25377412e1e9e608070826a;hpb=d89829d22853ee0b7678b6e2ee7fdd359f3b7202;p=collectd.git diff --git a/src/daemon/utils_avltree.c b/src/daemon/utils_avltree.c index 58b8b847..fcfbb945 100644 --- a/src/daemon/utils_avltree.c +++ b/src/daemon/utils_avltree.c @@ -245,7 +245,7 @@ static void rebalance (c_avl_tree_t *t, c_avl_node_t *n) { assert (n->right != NULL); b_bottom = BALANCE (n->right); - assert ((b_bottom >= -1) || (b_bottom <= 1)); + assert ((b_bottom >= -1) && (b_bottom <= 1)); if (b_bottom == 1) n = rotate_right_left (t, n); else @@ -255,7 +255,7 @@ static void rebalance (c_avl_tree_t *t, c_avl_node_t *n) { assert (n->left != NULL); b_bottom = BALANCE (n->left); - assert ((b_bottom >= -1) || (b_bottom <= 1)); + assert ((b_bottom >= -1) && (b_bottom <= 1)); if (b_bottom == -1) n = rotate_left_right (t, n); else