summaryrefslogtreecommitdiff
path: root/src/schema
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-09-22 09:36:00 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2015-09-22 09:36:00 +1000
commit5c88b7b1f81241fedd3ebb63ca399a522fca287e (patch)
treed9b4c8278b6e8577f3563cb8d7860f75ad89d6d4 /src/schema
parent0e37f582b94bcee469a9645bfc4eb9d8c0ab869b (diff)
downloadmongo-5c88b7b1f81241fedd3ebb63ca399a522fca287e.tar.gz
WT-2122 Convert more expressions to use bool. In particular, make F_ISSET a boolean expression and add F_MASK for applying a mask to flags.
Diffstat (limited to 'src/schema')
-rw-r--r--src/schema/schema_project.c8
-rw-r--r--src/schema/schema_worker.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/src/schema/schema_project.c b/src/schema/schema_project.c
index c9b69b3c922..1714322979e 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,7 @@ __wt_schema_project_slice(WT_SESSION_IMPL *session, WT_CURSOR **cp,
continue;
case WT_PROJ_VALUE:
- if ((skip = key_only) != 0)
+ if ((skip = key_only) != false)
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 76b47a2ccff..4dc337a309c 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));