summaryrefslogtreecommitdiff
path: root/src/include/cell.i
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2017-04-14 03:25:28 +1000
committerAlex Gorrod <alexander.gorrod@mongodb.com>2017-04-14 03:25:28 +1000
commitf5c08e2b5f02805b062888d45c9eca19af175f7e (patch)
tree0b43098fab6f6059c04c89e9b85337d5f625c5f2 /src/include/cell.i
parentd48181f6f4db08761ed7b80b0332908b272ad0d0 (diff)
parentcb16839cfbdf338af95bed43ca40979ae6e32f54 (diff)
Merge branch 'mongodb-3.4' into mongodb-3.2mongodb-3.2.13
Diffstat (limited to 'src/include/cell.i')
-rw-r--r--src/include/cell.i16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/include/cell.i b/src/include/cell.i
index c130768e595..71c2515daf0 100644
--- a/src/include/cell.i
+++ b/src/include/cell.i
@@ -361,14 +361,12 @@ __wt_cell_pack_leaf_key(WT_CELL *cell, uint8_t prefix, size_t size)
cell->__chunk[0] = (uint8_t)
((byte << WT_CELL_SHORT_SHIFT) | WT_CELL_KEY_SHORT);
return (1);
- } else {
- byte = (uint8_t)size; /* Type + length */
- cell->__chunk[0] = (uint8_t)
- ((byte << WT_CELL_SHORT_SHIFT) |
- WT_CELL_KEY_SHORT_PFX);
- cell->__chunk[1] = prefix; /* Prefix */
- return (2);
}
+ byte = (uint8_t)size; /* Type + length */
+ cell->__chunk[0] = (uint8_t)
+ ((byte << WT_CELL_SHORT_SHIFT) | WT_CELL_KEY_SHORT_PFX);
+ cell->__chunk[1] = prefix; /* Prefix */
+ return (2);
}
if (prefix == 0) {
@@ -569,8 +567,8 @@ __wt_cell_unpack_safe(
*/
#define WT_CELL_LEN_CHK(t, len) do { \
if (start != NULL && \
- ((uint8_t *)t < (uint8_t *)start || \
- (((uint8_t *)t) + (len)) > (uint8_t *)end)) \
+ ((uint8_t *)(t) < (uint8_t *)start || \
+ (((uint8_t *)(t)) + (len)) > (uint8_t *)end)) \
return (WT_ERROR); \
} while (0)