summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-10-04 12:57:37 -0400
committerKeith Bostic <keith@wiredtiger.com>2013-10-04 12:58:03 -0400
commite8a4a5634eec0c6389419a9e05c4dae6701f6324 (patch)
treefe1270fcd0093f23b050fea63c2b15f15d6e4b37 /src
parentf4a0a975d50acf6a4231a3dabe95f6fcf4d2e0d5 (diff)
downloadmongo-e8a4a5634eec0c6389419a9e05c4dae6701f6324.tar.gz
minor cleanup, only assign to kb.{data,size} once.
Diffstat (limited to 'src')
-rw-r--r--src/include/cursor.i10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/include/cursor.i b/src/include/cursor.i
index e71e1488d19..95af9be2275 100644
--- a/src/include/cursor.i
+++ b/src/include/cursor.i
@@ -196,8 +196,8 @@ __cursor_row_slot_return(WT_CURSOR_BTREE *cbt, WT_ROW *rip, WT_UPDATE *upd)
goto slow;
__wt_cell_unpack((WT_CELL *)ikey, unpack);
if (unpack->type == WT_CELL_KEY && unpack->prefix == 0) {
- kb->data = cbt->tmp.data = unpack->data;
- kb->size = cbt->tmp.size = unpack->size;
+ cbt->tmp.data = unpack->data;
+ cbt->tmp.size = unpack->size;
} else if (unpack->type == WT_CELL_KEY &&
cbt->rip_saved != NULL && cbt->rip_saved == rip - 1) {
/*
@@ -221,8 +221,6 @@ __cursor_row_slot_return(WT_CURSOR_BTREE *cbt, WT_ROW *rip, WT_UPDATE *upd)
memcpy((uint8_t *)cbt->tmp.data +
unpack->prefix, unpack->data, unpack->size);
cbt->tmp.size = unpack->prefix + unpack->size;
- kb->data = cbt->tmp.data;
- kb->size = cbt->tmp.size;
} else {
/*
* __wt_row_leaf_key_work instead of __wt_row_leaf_key:
@@ -230,9 +228,9 @@ __cursor_row_slot_return(WT_CURSOR_BTREE *cbt, WT_ROW *rip, WT_UPDATE *upd)
*/
slow: WT_RET(__wt_row_leaf_key_work(
session, cbt->page, rip, &cbt->tmp, 0));
- kb->data = cbt->tmp.data;
- kb->size = cbt->tmp.size;
}
+ kb->data = cbt->tmp.data;
+ kb->size = cbt->tmp.size;
cbt->rip_saved = rip;
}