Changeset 7d307e7 in mainline
- Timestamp:
- 2007-02-05T12:26:39Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 52c79ac
- Parents:
- 15819e37
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/btree.c
r15819e37 r7d307e7 138 138 void btree_destroy_subtree(btree_node_t *root) 139 139 { 140 int i;140 count_t i; 141 141 142 142 if (root->keys) { … … 270 270 271 271 if (node->keys > FILL_FACTOR) { 272 int i;272 count_t i; 273 273 274 274 /* … … 336 336 } else { 337 337 void *val; 338 int i;338 count_t i; 339 339 340 340 /* … … 443 443 void node_insert_key_and_lsubtree(btree_node_t *node, btree_key_t key, void *value, btree_node_t *lsubtree) 444 444 { 445 int i;445 count_t i; 446 446 447 447 for (i = 0; i < node->keys; i++) { 448 448 if (key < node->key[i]) { 449 int j;449 count_t j; 450 450 451 451 for (j = node->keys; j > i; j--) { … … 479 479 void node_insert_key_and_rsubtree(btree_node_t *node, btree_key_t key, void *value, btree_node_t *rsubtree) 480 480 { 481 int i;481 count_t i; 482 482 483 483 for (i = 0; i < node->keys; i++) { 484 484 if (key < node->key[i]) { 485 int j;485 count_t j; 486 486 487 487 for (j = node->keys; j > i; j--) { … … 511 511 void node_remove_key_and_lsubtree(btree_node_t *node, btree_key_t key) 512 512 { 513 int i, j;513 count_t i, j; 514 514 515 515 for (i = 0; i < node->keys; i++) { … … 539 539 void node_remove_key_and_rsubtree(btree_node_t *node, btree_key_t key) 540 540 { 541 int i, j;541 count_t i, j; 542 542 543 543 for (i = 0; i < node->keys; i++) { … … 577 577 { 578 578 btree_node_t *rnode; 579 int i, j;579 count_t i, j; 580 580 581 581 ASSERT(median); … … 604 604 * If this is an index node, do not copy the median. 605 605 */ 606 i = ( int) INDEX_NODE(node);606 i = (count_t) INDEX_NODE(node); 607 607 for (i += MEDIAN_HIGH_INDEX(node), j = 0; i < node->keys; i++, j++) { 608 608 rnode->key[j] = node->key[i]; … … 639 639 index_t idx; 640 640 btree_node_t *rnode; 641 int i;641 count_t i; 642 642 643 643 ASSERT(!ROOT_NODE(node)); … … 688 688 index_t find_key_by_subtree(btree_node_t *node, btree_node_t *subtree, bool right) 689 689 { 690 int i;690 count_t i; 691 691 692 692 for (i = 0; i < node->keys + 1; i++) { … … 941 941 void btree_print(btree_t *t) 942 942 { 943 int i, depth = t->root->depth; 943 count_t i; 944 int depth = t->root->depth; 944 945 link_t head, *cur; 945 946
Note:
See TracChangeset
for help on using the changeset viewer.