line |
true |
false |
branch |
86
|
0 |
31 |
if (!rbtree) { |
120
|
0 |
12 |
if (right->left != LDNS_RBTREE_NULL) |
125
|
4 |
8 |
if (node->parent != LDNS_RBTREE_NULL) { |
126
|
1 |
3 |
if (node == node->parent->left) { |
147
|
0 |
7 |
if (left->right != LDNS_RBTREE_NULL) |
152
|
0 |
7 |
if (node->parent != LDNS_RBTREE_NULL) { |
153
|
0 |
0 |
if (node == node->parent->right) { |
171
|
70 |
34 |
while (node != rbtree->root && node->parent->color == RED) { |
|
24 |
46 |
while (node != rbtree->root && node->parent->color == RED) { |
173
|
8 |
16 |
if (node->parent == node->parent->parent->left) { |
177
|
1 |
7 |
if (uncle->color == RED) { |
189
|
0 |
7 |
if (node == node->parent->right) { |
202
|
4 |
12 |
if (uncle->color == RED) { |
214
|
0 |
12 |
if (node == node->parent->left) { |
252
|
80 |
80 |
while (node != LDNS_RBTREE_NULL) { |
254
|
0 |
80 |
if ((r = rbtree->cmp(data->key, node->key)) == 0) { |
259
|
34 |
46 |
if (r < 0) { |
273
|
49 |
31 |
if (parent != LDNS_RBTREE_NULL) { |
274
|
25 |
24 |
if (r < 0) { |
298
|
6 |
80 |
if (ldns_rbtree_find_less_equal(rbtree, key, &node)) { |
320
|
0 |
0 |
if(parent == LDNS_RBTREE_NULL) |
322
|
0 |
0 |
if(rbtree->root == old) rbtree->root = new; |
325
|
0 |
0 |
if(parent->left == old) parent->left = new; |
326
|
0 |
0 |
if(parent->right == old) parent->right = new; |
331
|
0 |
0 |
if(child == LDNS_RBTREE_NULL) return; |
332
|
0 |
0 |
if(child->parent == old) child->parent = new; |
340
|
0 |
0 |
if((to_delete = ldns_rbtree_search(rbtree, key)) == 0) return 0; |
344
|
0 |
0 |
if(to_delete->left != LDNS_RBTREE_NULL && |
|
0 |
0 |
if(to_delete->left != LDNS_RBTREE_NULL && |
349
|
0 |
0 |
while(smright->left != LDNS_RBTREE_NULL) |
361
|
0 |
0 |
if(to_delete->right != smright) |
370
|
0 |
0 |
if(to_delete->right != smright) |
372
|
0 |
0 |
if(to_delete->right == smright) |
387
|
0 |
0 |
if(to_delete->left != LDNS_RBTREE_NULL) child = to_delete->left; |
394
|
0 |
0 |
if(to_delete->color == RED) |
398
|
0 |
0 |
else if(child->color == RED) |
401
|
0 |
0 |
if(child!=LDNS_RBTREE_NULL) child->color = BLACK; |
419
|
0 |
0 |
if(child_parent->right == child) sibling = child_parent->left; |
422
|
0 |
0 |
while(go_up) |
424
|
0 |
0 |
if(child_parent == LDNS_RBTREE_NULL) |
430
|
0 |
0 |
if(sibling->color == RED) |
434
|
0 |
0 |
if(child_parent->right == child) |
438
|
0 |
0 |
if(child_parent->right == child) sibling = child_parent->left; |
442
|
0 |
0 |
if(child_parent->color == BLACK |
443
|
0 |
0 |
&& sibling->color == BLACK |
444
|
0 |
0 |
&& sibling->left->color == BLACK |
445
|
0 |
0 |
&& sibling->right->color == BLACK) |
447
|
0 |
0 |
if(sibling != LDNS_RBTREE_NULL) |
453
|
0 |
0 |
if(child_parent->right == child) sibling = child_parent->left; |
459
|
0 |
0 |
if(child_parent->color == RED |
460
|
0 |
0 |
&& sibling->color == BLACK |
461
|
0 |
0 |
&& sibling->left->color == BLACK |
462
|
0 |
0 |
&& sibling->right->color == BLACK) |
465
|
0 |
0 |
if(sibling != LDNS_RBTREE_NULL) |
473
|
0 |
0 |
if(child_parent->right == child |
474
|
0 |
0 |
&& sibling->color == BLACK |
475
|
0 |
0 |
&& sibling->right->color == RED |
476
|
0 |
0 |
&& sibling->left->color == BLACK) |
482
|
0 |
0 |
if(child_parent->right == child) sibling = child_parent->left; |
485
|
0 |
0 |
else if(child_parent->left == child |
486
|
0 |
0 |
&& sibling->color == BLACK |
487
|
0 |
0 |
&& sibling->left->color == RED |
488
|
0 |
0 |
&& sibling->right->color == BLACK) |
494
|
0 |
0 |
if(child_parent->right == child) sibling = child_parent->left; |
501
|
0 |
0 |
if(child_parent->right == child) |
525
|
89 |
80 |
while (node != LDNS_RBTREE_NULL) { |
527
|
6 |
83 |
if (r == 0) { |
532
|
34 |
49 |
if (r < 0) { |
552
|
0 |
0 |
if (rbtree->root != LDNS_RBTREE_NULL) { |
553
|
0 |
0 |
for (node = rbtree->root; node->left != LDNS_RBTREE_NULL; node = node->left); |
563
|
0 |
0 |
if (rbtree->root != LDNS_RBTREE_NULL) { |
564
|
0 |
0 |
for (node = rbtree->root; node->right != LDNS_RBTREE_NULL; node = node->right); |
578
|
0 |
0 |
if (node->right != LDNS_RBTREE_NULL) { |
580
|
0 |
0 |
for (node = node->right; |
585
|
0 |
0 |
while (parent != LDNS_RBTREE_NULL && node == parent->right) { |
|
0 |
0 |
while (parent != LDNS_RBTREE_NULL && node == parent->right) { |
599
|
0 |
0 |
if (node->left != LDNS_RBTREE_NULL) { |
601
|
0 |
0 |
for (node = node->left; |
606
|
0 |
0 |
while (parent != LDNS_RBTREE_NULL && node == parent->left) { |
|
0 |
0 |
while (parent != LDNS_RBTREE_NULL && node == parent->left) { |
631
|
0 |
0 |
while (count < elements && cur_node != LDNS_RBTREE_NULL) { |
|
0 |
0 |
while (count < elements && cur_node != LDNS_RBTREE_NULL) { |
656
|
191 |
0 |
if(!node || node == LDNS_RBTREE_NULL) |
|
111 |
80 |
if(!node || node == LDNS_RBTREE_NULL) |