summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2013-03-08 07:32:48 -0500
committerKeith Bostic <keith@wiredtiger.com>2013-03-08 07:33:15 -0500
commit7e1bf2482d0bec220dc20de45427428193f96134 (patch)
treec11b9e762a96087d08d34ca1b750491f05470f8a
parent0fd6e14db4ec62aebd46bc83698fa55c64408b2e (diff)
downloadmongo-7e1bf2482d0bec220dc20de45427428193f96134.tar.gz
Minor lint, get rid of WT_ALIGN32, it's no longer needed as far as I can tell.
-rw-r--r--src/block/block_write.c2
-rw-r--r--src/btree/bt_handle.c6
-rw-r--r--src/include/misc.h2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/block/block_write.c b/src/block/block_write.c
index 82d8cb490b5..a950cadf3bd 100644
--- a/src/block/block_write.c
+++ b/src/block/block_write.c
@@ -87,7 +87,7 @@ __wt_block_write_off(WT_SESSION_IMPL *session, WT_BLOCK *block,
* boundary, this is one of the reasons the btree layer must find out
* from the block-manager layer the maximum size of the eventual write.
*/
- align_size = WT_ALIGN32(buf->size, block->allocsize);
+ align_size = WT_ALIGN(buf->size, block->allocsize);
if (align_size > buf->memsize) {
WT_ASSERT(session, align_size <= buf->memsize);
WT_RET_MSG(session, EINVAL,
diff --git a/src/btree/bt_handle.c b/src/btree/bt_handle.c
index 5954c917d54..b537c2a42d2 100644
--- a/src/btree/bt_handle.c
+++ b/src/btree/bt_handle.c
@@ -569,7 +569,7 @@ __btree_page_sizes(WT_SESSION_IMPL *session, const char *config)
* parent.
*/
WT_RET(__wt_config_getones(session, config, "memory_page_max", &cval));
- btree->maxmempage = WT_MAX((uint64_t)cval.val, 50 * btree->maxleafpage);
+ btree->maxmempage = (uint64_t)WT_MAX(cval.val, 50 * btree->maxleafpage);
/*
* Limit allocation units to 128MB, and page sizes to 512MB. There's no
@@ -661,7 +661,7 @@ __wt_split_page_size(WT_BTREE *btree, uint32_t maxpagesize)
* we don't waste space when we write).
*/
a = maxpagesize; /* Don't overflow. */
- split_size = WT_ALIGN32((a * btree->split_pct) / 100, btree->allocsize);
+ split_size = WT_ALIGN((a * btree->split_pct) / 100, btree->allocsize);
/*
* If the result of that calculation is the same as the allocation unit
@@ -669,7 +669,7 @@ __wt_split_page_size(WT_BTREE *btree, uint32_t maxpagesize)
* unit, use a percentage of the maximum page size).
*/
if (split_size == btree->allocsize)
- split_size = (a * btree->split_pct) / 100;
+ split_size = (uint32_t)((a * btree->split_pct) / 100);
return (split_size);
}
diff --git a/src/include/misc.h b/src/include/misc.h
index 666ba71ae8a..2757eb363f5 100644
--- a/src/include/misc.h
+++ b/src/include/misc.h
@@ -41,8 +41,6 @@
*/
#define WT_ALIGN(n, v) \
((((uintmax_t)(n)) + ((v) - 1)) & ~(((uintmax_t)(v)) - 1))
-#define WT_ALIGN32(n, v) \
- ((uint32_t)WT_ALIGN(n, v))
/* Min, max. */
#define WT_MIN(a, b) ((a) < (b) ? (a) : (b))