summaryrefslogtreecommitdiff
path: root/src/schema
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-09-24 15:18:36 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2015-09-29 16:07:45 +1000
commitd1dff562e256cf3726f8ec229feced879f212096 (patch)
tree08f2e2b6215f2a73601cabe275e91bd6ebf1677a /src/schema
parent6f6281c978507312def82af8fa6dd020b9fcb1a6 (diff)
downloadmongo-d1dff562e256cf3726f8ec229feced879f212096.tar.gz
WT-2122 Convert more expressions to use bool
Merge pull request #2208 from wiredtiger/more-bool (cherry picked from commit f1837bf787832c818d226df4c662093d124b01f8)
Diffstat (limited to 'src/schema')
-rw-r--r--src/schema/schema_project.c9
-rw-r--r--src/schema/schema_worker.c6
2 files changed, 8 insertions, 7 deletions
diff --git a/src/schema/schema_project.c b/src/schema/schema_project.c
index c9b69b3c922..be5f73b48ed 100644
--- a/src/schema/schema_project.c
+++ b/src/schema/schema_project.c
@@ -220,7 +220,7 @@ __wt_schema_project_out(WT_SESSION_IMPL *session,
*/
int
__wt_schema_project_slice(WT_SESSION_IMPL *session, WT_CURSOR **cp,
- const char *proj_arg, int key_only, const char *vformat, WT_ITEM *value)
+ const char *proj_arg, bool key_only, const char *vformat, WT_ITEM *value)
{
WT_CURSOR *c;
WT_DECL_ITEM(buf);
@@ -233,7 +233,7 @@ __wt_schema_project_slice(WT_SESSION_IMPL *session, WT_CURSOR **cp,
uint8_t *end, *p;
const uint8_t *next, *vp, *vend;
size_t len, offset, old_len;
- int skip;
+ bool skip;
p = end = NULL; /* -Wuninitialized */
@@ -259,7 +259,7 @@ __wt_schema_project_slice(WT_SESSION_IMPL *session, WT_CURSOR **cp,
switch (*proj) {
case WT_PROJ_KEY:
- skip = 0;
+ skip = false;
c = cp[arg];
if (WT_CURSOR_RECNO(c)) {
c->key.data = &c->recno;
@@ -274,7 +274,8 @@ __wt_schema_project_slice(WT_SESSION_IMPL *session, WT_CURSOR **cp,
continue;
case WT_PROJ_VALUE:
- if ((skip = key_only) != 0)
+ skip = key_only;
+ if (skip)
continue;
c = cp[arg];
WT_RET(__pack_init(session, &pack, c->value_format));
diff --git a/src/schema/schema_worker.c b/src/schema/schema_worker.c
index 7d747f54a76..5bc67d1ae76 100644
--- a/src/schema/schema_worker.c
+++ b/src/schema/schema_worker.c
@@ -17,7 +17,7 @@ int
__wt_schema_worker(WT_SESSION_IMPL *session,
const char *uri,
int (*file_func)(WT_SESSION_IMPL *, const char *[]),
- int (*name_func)(WT_SESSION_IMPL *, const char *, int *),
+ int (*name_func)(WT_SESSION_IMPL *, const char *, bool *),
const char *cfg[], uint32_t open_flags)
{
WT_COLGROUP *colgroup;
@@ -28,12 +28,12 @@ __wt_schema_worker(WT_SESSION_IMPL *session,
WT_TABLE *table;
const char *tablename;
u_int i;
- int skip;
+ bool skip;
table = NULL;
tablename = uri;
- skip = 0;
+ skip = false;
if (name_func != NULL)
WT_ERR(name_func(session, uri, &skip));