diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-03-20 16:04:42 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-03-20 16:04:42 -0400 |
commit | 153619ee1dfd04c654c0075ad2daa6d3aa57dcea (patch) | |
tree | 232f7b760f7d164b1cbcada5ca60e390929900da /src/btree/bt_huffman.c | |
parent | 123c0bd6a2cf96c2fd17d542f537257b9de8a8b9 (diff) | |
download | mongo-153619ee1dfd04c654c0075ad2daa6d3aa57dcea.tar.gz |
Push the rest of the FILE handle functions down into the OS-specific
code, get rid of all calls to __wt_errno() from the upper-level code.
Rename the WiredTiger FILE handle functions to match stdio(3).
Diffstat (limited to 'src/btree/bt_huffman.c')
-rw-r--r-- | src/btree/bt_huffman.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/btree/bt_huffman.c b/src/btree/bt_huffman.c index 80352a0f56c..7fa976203cd 100644 --- a/src/btree/bt_huffman.c +++ b/src/btree/bt_huffman.c @@ -156,15 +156,11 @@ __huffman_confchk_file( /* Check the file exists. */ WT_RET(__wt_strndup(session, v->str + len, v->len - len, &fname)); - fp = fopen(fname, "r"); - __wt_free(session, fname); - if (fp == NULL) - WT_RET_MSG(session, __wt_errno(), - "unable to read Huffman table file %s", fname); + WT_RET(__wt_fopen(session, fname, "r", WT_FOPEN_FIXED, &fp)); /* Optionally return the file handle. */ if (fpp == NULL) - (void)fclose(fp); + (void)__wt_fclose(session, &fp); else *fpp = fp; @@ -368,8 +364,7 @@ __wt_huffman_read(WT_SESSION_IMPL *session, WT_CONFIG_ITEM *ip, if (0) { err: __wt_free(session, table); } - if (fp != NULL) - (void)fclose(fp); + (void)__wt_fclose(session, &fp); return (ret); } |