summaryrefslogtreecommitdiff
path: root/src/block/block_slvg.c
diff options
context:
space:
mode:
authorKeith Bostic <keith.bostic@wiredtiger.com>2012-01-29 13:28:27 +0000
committerKeith Bostic <keith.bostic@wiredtiger.com>2012-01-29 13:28:27 +0000
commit6325327ac732faeb0a5108cae06be872ca0a3d1d (patch)
tree46443780f97dc20ba4d2bd4b8ce9b43e55c63330 /src/block/block_slvg.c
parent6e190aa7d6cc610c7e93a9695cfa65f10da8912d (diff)
downloadmongo-6325327ac732faeb0a5108cae06be872ca0a3d1d.tar.gz
If a file is big enough, and empty enough, a free range can overflow
32-bits; change free-range specifications from off_t/uint32_t pairs to off_t/off_t pairs. According the Single UNIX Specification, Version 2, off_t is a signed type, use intmax_t/PRIdMAX instead of uintmax_t/PRIuMAX to print it.
Diffstat (limited to 'src/block/block_slvg.c')
-rw-r--r--src/block/block_slvg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/block/block_slvg.c b/src/block/block_slvg.c
index cbbee94527c..5d0e3a603f9 100644
--- a/src/block/block_slvg.c
+++ b/src/block/block_slvg.c
@@ -126,8 +126,8 @@ skip: WT_VERBOSE(session, salvage,
* Free the block and make sure we don't return it more
* than once.
*/
- WT_RET(
- __wt_block_free(session, block, offset, allocsize));
+ WT_RET(__wt_block_free(
+ session, block, offset, (off_t)allocsize));
block->slvg_off = offset += allocsize;
continue;
}