summaryrefslogtreecommitdiff
path: root/src/os_win/os_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_win/os_open.c')
-rw-r--r--src/os_win/os_open.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/os_win/os_open.c b/src/os_win/os_open.c
index 9bdae92774b..c7b30408e63 100644
--- a/src/os_win/os_open.c
+++ b/src/os_win/os_open.c
@@ -22,7 +22,8 @@ __wt_open(WT_SESSION_IMPL *session,
WT_DECL_RET;
WT_FH *fh, *tfh;
uint64_t bucket, hash;
- int direct_io, f, matched, share_mode;
+ int f, share_mode;
+ bool direct_io, matched;
char *path;
conn = S2C(session);
@@ -30,20 +31,20 @@ __wt_open(WT_SESSION_IMPL *session,
path = NULL;
filehandle = INVALID_HANDLE_VALUE;
filehandle_secondary = INVALID_HANDLE_VALUE;
- direct_io = 0;
+ direct_io = false;
hash = __wt_hash_city64(name, strlen(name));
bucket = hash % WT_HASH_ARRAY_SIZE;
WT_RET(__wt_verbose(session, WT_VERB_FILEOPS, "%s: open", name));
/* Increment the reference count if we already have the file open. */
- matched = 0;
+ matched = false;
__wt_spin_lock(session, &conn->fh_lock);
TAILQ_FOREACH(tfh, &conn->fhhash[bucket], hashq)
if (strcmp(name, tfh->name) == 0) {
++tfh->ref;
*fhp = tfh;
- matched = 1;
+ matched = true;
break;
}
__wt_spin_unlock(session, &conn->fh_lock);
@@ -79,7 +80,7 @@ __wt_open(WT_SESSION_IMPL *session,
if (dio_type && FLD_ISSET(conn->direct_io, dio_type)) {
f |= FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH;
- direct_io = 1;
+ direct_io = true;
}
if (dio_type == WT_FILE_TYPE_LOG &&
@@ -158,13 +159,13 @@ setupfh:
* Repeat the check for a match, but then link onto the database's list
* of files.
*/
- matched = 0;
+ matched = false;
__wt_spin_lock(session, &conn->fh_lock);
TAILQ_FOREACH(tfh, &conn->fhhash[bucket], hashq)
if (strcmp(name, tfh->name) == 0) {
++tfh->ref;
*fhp = tfh;
- matched = 1;
+ matched = true;
break;
}
if (!matched) {