Commit 2f5fcf1f authored by John Esmet's avatar John Esmet

Avoid shadowing an existing variable

parent f0ed0885
...@@ -406,29 +406,29 @@ flush_to_internal(FT_HANDLE t) { ...@@ -406,29 +406,29 @@ flush_to_internal(FT_HANDLE t) {
MSN msn = msg->msn; MSN msn = msg->msn;
enum ft_msg_type type = ft_msg_get_type(msg); enum ft_msg_type type = ft_msg_get_type(msg);
XIDS xids = ft_msg_get_xids(msg); XIDS xids = ft_msg_get_xids(msg);
for (int i = 0; i < num_parent_messages; ++i) { for (int k = 0; k < num_parent_messages; ++k) {
if (dummy_cmp(NULL, &keydbt, parent_messages[i]->u.id.key) == 0 && if (dummy_cmp(NULL, &keydbt, parent_messages[k]->u.id.key) == 0 &&
msn.msn == parent_messages[i]->msn.msn) { msn.msn == parent_messages[k]->msn.msn) {
assert(parent_messages_present[i] == 0); assert(parent_messages_present[k] == 0);
assert(found == 0); assert(found == 0);
assert(dummy_cmp(NULL, &valdbt, parent_messages[i]->u.id.val) == 0); assert(dummy_cmp(NULL, &valdbt, parent_messages[k]->u.id.val) == 0);
assert(type == parent_messages[i]->type); assert(type == parent_messages[k]->type);
assert(xids_get_innermost_xid(xids) == xids_get_innermost_xid(parent_messages[i]->xids)); assert(xids_get_innermost_xid(xids) == xids_get_innermost_xid(parent_messages[k]->xids));
assert(parent_messages_is_fresh[i] == is_fresh); assert(parent_messages_is_fresh[k] == is_fresh);
parent_messages_present[i]++; parent_messages_present[k]++;
found++; found++;
} }
} }
for (int i = 0; i < num_child_messages; ++i) { for (int k = 0; k < num_child_messages; ++k) {
if (dummy_cmp(NULL, &keydbt, child_messages[i]->u.id.key) == 0 && if (dummy_cmp(NULL, &keydbt, child_messages[k]->u.id.key) == 0 &&
msn.msn == child_messages[i]->msn.msn) { msn.msn == child_messages[k]->msn.msn) {
assert(child_messages_present[i] == 0); assert(child_messages_present[k] == 0);
assert(found == 0); assert(found == 0);
assert(dummy_cmp(NULL, &valdbt, child_messages[i]->u.id.val) == 0); assert(dummy_cmp(NULL, &valdbt, child_messages[k]->u.id.val) == 0);
assert(type == child_messages[i]->type); assert(type == child_messages[k]->type);
assert(xids_get_innermost_xid(xids) == xids_get_innermost_xid(child_messages[i]->xids)); assert(xids_get_innermost_xid(xids) == xids_get_innermost_xid(child_messages[k]->xids));
assert(child_messages_is_fresh[i] == is_fresh); assert(child_messages_is_fresh[k] == is_fresh);
child_messages_present[i]++; child_messages_present[k]++;
found++; found++;
} }
} }
......
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