diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2018-03-19 03:51:19 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2018-03-19 03:51:19 (GMT) |
commit | d812c6fe60fec2451d8d78b8fb51547628307a6c (patch) | |
tree | fb1f02516e6dfe5abce1cdb0155046b5d68a73d5 /test/efc.c | |
parent | c31460c1b76c8d11534b57f025c57bdff9321f44 (diff) | |
download | hdf5-d812c6fe60fec2451d8d78b8fb51547628307a6c.zip hdf5-d812c6fe60fec2451d8d78b8fb51547628307a6c.tar.gz hdf5-d812c6fe60fec2451d8d78b8fb51547628307a6c.tar.bz2 |
Cleanup API context function usage.
Diffstat (limited to 'test/efc.c')
-rw-r--r-- | test/efc.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -2891,7 +2891,7 @@ int main(void) { unsigned nerrors = 0; /* track errors */ -hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ + hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ /* Test Setup */ puts("Testing the external file cache"); @@ -2907,8 +2907,10 @@ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */ h5_fixname(FILENAME[3], fapl_id, filename[3], sizeof(filename[3])); h5_fixname(FILENAME[4], fapl_id, filename[4], sizeof(filename[4])); h5_fixname(FILENAME[5], fapl_id, filename[5], sizeof(filename[5])); -if(H5CX_push() < 0) FAIL_STACK_ERROR -api_ctx_pushed = TRUE; + + /* Push API context */ + if(H5CX_push() < 0) FAIL_STACK_ERROR + api_ctx_pushed = TRUE; /* Test Functions */ nerrors += test_single(); @@ -2921,8 +2923,10 @@ api_ctx_pushed = TRUE; /* Verify symbol table messages are cached */ nerrors += (h5_verify_cached_stabs(FILENAME, fapl_id) < 0 ? 1 : 0); -if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR -api_ctx_pushed = FALSE; + + /* Pop API context */ + if(api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR + api_ctx_pushed = FALSE; if(nerrors) goto error; @@ -2940,6 +2944,8 @@ error: H5Pclose(fapl_id); } H5E_END_TRY + if(api_ctx_pushed) H5CX_pop(); + return 1; } /* end main() */ |