diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-12-22 11:17:18 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-12-22 11:17:18 -0500 |
commit | ad123e28f49d92dc85583a1e6274743b33d78882 (patch) | |
tree | 73ef2dab0556da3e13543678913c6e8eba48bc27 /src/block/block_read.c | |
parent | c45822e7ba33fa78f7f566e0b9868cded87a65c1 (diff) | |
download | mongo-ad123e28f49d92dc85583a1e6274743b33d78882.tar.gz |
Rework uint32_t/size_t declarations, size_t is more appropriate for the
size of a WT_ITEM buffer.
Diffstat (limited to 'src/block/block_read.c')
-rw-r--r-- | src/block/block_read.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/block/block_read.c b/src/block/block_read.c index 8bf07b77ccf..866fe648e07 100644 --- a/src/block/block_read.c +++ b/src/block/block_read.c @@ -145,7 +145,8 @@ __wt_block_read_off(WT_SESSION_IMPL *session, WT_BLOCK *block, WT_ITEM *buf, off_t offset, uint32_t size, uint32_t cksum) { WT_BLOCK_HEADER *blk; - uint32_t alloc_size, page_cksum; + size_t bufsize; + uint32_t page_cksum; WT_VERBOSE_RET(session, read, "off %" PRIuMAX ", size %" PRIu32 ", cksum %" PRIu32, @@ -161,13 +162,13 @@ __wt_block_read_off(WT_SESSION_IMPL *session, * we're not adding any additional processing time.) */ if (F_ISSET(buf, WT_ITEM_ALIGNED)) - alloc_size = size; + bufsize = size; else { F_SET(buf, WT_ITEM_ALIGNED); - alloc_size = (uint32_t)WT_MAX(size, buf->memsize + 10); + bufsize = WT_MAX(size, buf->memsize + 10); } - WT_RET(__wt_buf_init(session, buf, alloc_size)); - WT_RET(__wt_read(session, block->fh, offset, (size_t)size, buf->mem)); + WT_RET(__wt_buf_init(session, buf, bufsize)); + WT_RET(__wt_read(session, block->fh, offset, size, buf->mem)); buf->size = size; blk = WT_BLOCK_HEADER_REF(buf->mem); |