diff options
author | Sean McBride <sean@rogue-research.com> | 2023-08-02 13:39:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 13:39:15 (GMT) |
commit | 2b0badb90e4e516d0758efbd8ec96449188c7249 (patch) | |
tree | 074e38039b95ca7121a0117069974eff52a04519 /src/H5Ftest.c | |
parent | 56451503c55ef6e5f67fc3bb710f9e5b649b1af2 (diff) | |
download | hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.zip hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.gz hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.bz2 |
Made HGOTO_ERROR a do-while loop (#3308)
* Made HGOTO_ERROR a do-while loop
Diffstat (limited to 'src/H5Ftest.c')
-rw-r--r-- | src/H5Ftest.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/H5Ftest.c b/src/H5Ftest.c index d56461b..593c525 100644 --- a/src/H5Ftest.c +++ b/src/H5Ftest.c @@ -90,16 +90,16 @@ H5F__get_sohm_mesg_count_test(hid_t file_id, unsigned type_id, size_t *mesg_coun /* Check arguments */ if (NULL == (file = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* Push API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Retrieve count for message type */ if (H5SM__get_mesg_count_test(file, type_id, mesg_count) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve shared message count") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't retrieve shared message count"); done: if (api_ctx_pushed && H5CX_pop(FALSE) < 0) @@ -131,16 +131,16 @@ H5F__check_cached_stab_test(hid_t file_id) /* Check arguments */ if (NULL == (file = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* Push API context */ if (H5CX_push() < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context") + HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set API context"); api_ctx_pushed = TRUE; /* Verify the cached stab info */ if (H5G__verify_cached_stab_test(H5G_oloc(file->shared->root_grp), file->shared->sblock->root_ent) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to verify cached symbol table info") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to verify cached symbol table info"); done: if (api_ctx_pushed && H5CX_pop(FALSE) < 0) @@ -168,7 +168,7 @@ H5F__get_maxaddr_test(hid_t file_id, haddr_t *maxaddr) /* Check arguments */ if (NULL == (file = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* Retrieve maxaddr for file */ *maxaddr = file->shared->maxaddr; @@ -197,7 +197,7 @@ H5F__get_sbe_addr_test(hid_t file_id, haddr_t *sbe_addr) /* Check arguments */ if (NULL == (file = (H5F_t *)H5VL_object_verify(file_id, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* Retrieve maxaddr for file */ *sbe_addr = file->shared->sblock->ext_addr; @@ -225,9 +225,9 @@ H5F__same_file_test(hid_t file_id1, hid_t file_id2) /* Check arguments */ if (NULL == (file1 = (H5F_t *)H5VL_object_verify(file_id1, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); if (NULL == (file2 = (H5F_t *)H5VL_object_verify(file_id2, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file"); /* If they are using the same underlying "shared" file struct, they are the same file */ ret_value = (file1->shared == file2->shared); @@ -259,7 +259,7 @@ H5F__reparse_file_lock_variable_test(void) /* Check the file locking environment variable */ if (H5F__parse_file_lock_env_var(&use_locks_env_g) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to parse file locking environment variable") + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "unable to parse file locking environment variable"); done: FUNC_LEAVE_NOAPI(ret_value) |