Commit 2f5edae6 authored by Zardosht Kasheff's avatar Zardosht Kasheff

addresses #523

address more CR comments from previous checkin

git-svn-id: file:///svn/tokudb@2792 c7de825b-a66e-492c-adef-691d508d4ae1
parent d5312ffb
...@@ -368,7 +368,7 @@ void toku_rt_start_scan (toku_range_tree* range_tree) { ...@@ -368,7 +368,7 @@ void toku_rt_start_scan (toku_range_tree* range_tree) {
return; return;
} }
int toku_rt_next (toku_range_tree* range_tree, toku_range* out_range) { int toku_rt_next (toku_range_tree* range_tree, toku_range* out_range, BOOL* elem_found) {
int r = ENOSYS; int r = ENOSYS;
toku_range* ret_range = NULL; toku_range* ret_range = NULL;
struct toku_rbt_node* ignore_insert = NULL; struct toku_rbt_node* ignore_insert = NULL;
...@@ -393,9 +393,10 @@ int toku_rt_next (toku_range_tree* range_tree, toku_range* out_range) { ...@@ -393,9 +393,10 @@ int toku_rt_next (toku_range_tree* range_tree, toku_range* out_range) {
if (r != 0) { goto cleanup; } if (r != 0) { goto cleanup; }
} }
out_range->left = ret_range->left; if (ret_range) {
out_range->right = ret_range->right; *elem_found = TRUE;
out_range->data = ret_range->data; *out_range = *ret_range;
}
r = 0; r = 0;
cleanup: cleanup:
......
...@@ -226,6 +226,6 @@ int toku_rt_get_size(toku_range_tree* tree, u_int32_t* size); ...@@ -226,6 +226,6 @@ int toku_rt_get_size(toku_range_tree* tree, u_int32_t* size);
void toku_rt_start_scan (toku_range_tree* range_tree); void toku_rt_start_scan (toku_range_tree* range_tree);
int toku_rt_next (toku_range_tree* range_tree, toku_range* out_range); int toku_rt_next (toku_range_tree* range_tree, toku_range* out_range, BOOL* elem_found);
#endif /* #if !defined(TOKU_RANGE_TREE_H) */ #endif /* #if !defined(TOKU_RANGE_TREE_H) */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment