diff options
author | Michael Cahill <michael.cahill@mongodb.com> | 2015-09-08 15:40:05 +1000 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2015-09-08 15:40:05 +1000 |
commit | 5a440d45fc052e5ebde92e0266d0dae93f2c701d (patch) | |
tree | 5936cc8d4292a24538c85c3b12b3897c14e45f91 /src/btree/bt_split.c | |
parent | 39a69ec79cdb04e0f9286212e86d0c038db87b92 (diff) | |
download | mongo-5a440d45fc052e5ebde92e0266d0dae93f2c701d.tar.gz |
WT-2093 Use the C99 bool type to clarify when functions return true/false.
Diffstat (limited to 'src/btree/bt_split.c')
-rw-r--r-- | src/btree/bt_split.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/btree/bt_split.c b/src/btree/bt_split.c index 58d90c70c51..8744ddfe497 100644 --- a/src/btree/bt_split.c +++ b/src/btree/bt_split.c @@ -173,7 +173,7 @@ __split_safe_free(WT_SESSION_IMPL *session, * __split_should_deepen -- * Return if we should deepen the tree. */ -static int +static bool __split_should_deepen(WT_SESSION_IMPL *session, WT_REF *ref) { WT_BTREE *btree; @@ -196,7 +196,7 @@ __split_should_deepen(WT_SESSION_IMPL *session, WT_REF *ref) * pressure on the cache). */ if (page->memory_footprint < btree->maxmempage) - return (0); + return (false); /* * Ensure the page has enough entries to make it worth splitting and @@ -204,7 +204,7 @@ __split_should_deepen(WT_SESSION_IMPL *session, WT_REF *ref) * splitting won't help). */ if (pindex->entries > btree->split_deepen_min_child) - return (1); + return (true); /* * Don't allow a single page to put pressure on cache usage. The root @@ -216,9 +216,9 @@ __split_should_deepen(WT_SESSION_IMPL *session, WT_REF *ref) if (pindex->entries >= 100 && (__wt_ref_is_root(ref) || page->memory_footprint >= S2C(session)->cache_size / 4)) - return (1); + return (true); - return (0); + return (false); } /* |