Changes in kernel/generic/src/adt/btree.c [e98f1c3e:63e27ef] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/btree.c
re98f1c3e r63e27ef 49 49 #include <adt/btree.h> 50 50 #include <adt/list.h> 51 #include <assert.h> 51 52 #include <mm/slab.h> 52 #include <debug.h>53 53 #include <panic.h> 54 54 #include <print.h> … … 500 500 size_t j; 501 501 502 ASSERT(median);503 ASSERT(node->keys == BTREE_MAX_KEYS);502 assert(median); 503 assert(node->keys == BTREE_MAX_KEYS); 504 504 505 505 /* … … 625 625 btree_node_t *lnode; 626 626 627 ASSERT(value);627 assert(value); 628 628 629 629 lnode = leaf_node; … … 725 725 size_t i; 726 726 727 ASSERT(!ROOT_NODE(node));727 assert(!ROOT_NODE(node)); 728 728 729 729 idx = find_key_by_subtree(node->parent, node, false); … … 837 837 838 838 idx = find_key_by_subtree(parent, rnode, true); 839 ASSERT((int) idx != -1);839 assert((int) idx != -1); 840 840 slab_free(btree_node_slab, rnode); 841 841 _btree_remove(t, parent->key[idx], parent); … … 951 951 btree_node_t *btree_leaf_node_left_neighbour(btree_t *t, btree_node_t *node) 952 952 { 953 ASSERT(LEAF_NODE(node));953 assert(LEAF_NODE(node)); 954 954 955 955 if (node->leaf_link.prev != &t->leaf_list.head) … … 970 970 btree_node_t *btree_leaf_node_right_neighbour(btree_t *t, btree_node_t *node) 971 971 { 972 ASSERT(LEAF_NODE(node));972 assert(LEAF_NODE(node)); 973 973 974 974 if (node->leaf_link.next != &t->leaf_list.head) … … 1002 1002 1003 1003 hlp = list_first(&list); 1004 ASSERT(hlp != NULL);1004 assert(hlp != NULL); 1005 1005 node = list_get_instance(hlp, btree_node_t, bfs_link); 1006 1006 list_remove(hlp); 1007 1007 1008 ASSERT(node);1008 assert(node); 1009 1009 1010 1010 if (node->depth != depth) { … … 1032 1032 printf("Printing list of leaves:\n"); 1033 1033 list_foreach(t->leaf_list, leaf_link, btree_node_t, node) { 1034 ASSERT(node);1034 assert(node); 1035 1035 1036 1036 printf("(");
Note:
See TracChangeset
for help on using the changeset viewer.