diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 15:29:53 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 15:29:53 (GMT) |
commit | ec8ad09125032c9c232878d02e90aa86df162841 (patch) | |
tree | 5d63105d3a0db7d5bbee41c5b74b097649a2115e /src/H5Ctest.c | |
parent | 453238e90e1574ef1c15e3c79f7fb3d77920e77c (diff) | |
download | hdf5-ec8ad09125032c9c232878d02e90aa86df162841.zip hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.gz hdf5-ec8ad09125032c9c232878d02e90aa86df162841.tar.bz2 |
Source formatted
Diffstat (limited to 'src/H5Ctest.c')
-rw-r--r-- | src/H5Ctest.c | 50 |
1 files changed, 19 insertions, 31 deletions
diff --git a/src/H5Ctest.c b/src/H5Ctest.c index 40d487e..859db76 100644 --- a/src/H5Ctest.c +++ b/src/H5Ctest.c @@ -27,58 +27,48 @@ /* Module Setup */ /****************/ -#include "H5Cmodule.h" /* This source code file is part of the H5C module */ -#define H5C_TESTING /*suppress warning about H5C testing funcs*/ -#define H5F_FRIEND /*suppress error about including H5Fpkg */ - +#include "H5Cmodule.h" /* This source code file is part of the H5C module */ +#define H5C_TESTING /*suppress warning about H5C testing funcs*/ +#define H5F_FRIEND /*suppress error about including H5Fpkg */ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Cpkg.h" /* Cache */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Fpkg.h" /* Files */ -#include "H5Iprivate.h" /* IDs */ - +#include "H5private.h" /* Generic Functions */ +#include "H5Cpkg.h" /* Cache */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Fpkg.h" /* Files */ +#include "H5Iprivate.h" /* IDs */ /****************/ /* Local Macros */ /****************/ - /******************/ /* Local Typedefs */ /******************/ /* Typedef for tagged entry iterator callback context - verify cork tag */ typedef struct { - hbool_t status; /* Corked status */ + hbool_t status; /* Corked status */ } H5C_tag_iter_vct_ctx_t; - /********************/ /* Local Prototypes */ /********************/ - /*********************/ /* Package Variables */ /*********************/ - /*****************************/ /* Library Private Variables */ /*****************************/ - /*******************/ /* Local Variables */ /*******************/ - - - /*------------------------------------------------------------------------- * Function: H5C__verify_cork_tag_test_cb * @@ -95,8 +85,8 @@ static int H5C__verify_cork_tag_test_cb(H5C_cache_entry_t *entry, void *_ctx) { H5C_tag_iter_vct_ctx_t *ctx = (H5C_tag_iter_vct_ctx_t *)_ctx; /* Get pointer to iterator context */ - hbool_t is_corked; /* Corked status for entry */ - int ret_value = H5_ITER_CONT; /* Return value */ + hbool_t is_corked; /* Corked status for entry */ + int ret_value = H5_ITER_CONT; /* Return value */ /* Function enter macro */ FUNC_ENTER_STATIC @@ -109,14 +99,13 @@ H5C__verify_cork_tag_test_cb(H5C_cache_entry_t *entry, void *_ctx) is_corked = entry->tag_info ? entry->tag_info->corked : FALSE; /* Verify corked status for entry */ - if(is_corked != ctx->status) + if (is_corked != ctx->status) HGOTO_ERROR(H5E_CACHE, H5E_BADVALUE, H5_ITER_ERROR, "bad cork status") done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__verify_cork_tag_test_cb() */ - /*------------------------------------------------------------------------- * Function: H5C__verify_cork_tag_test * @@ -133,17 +122,17 @@ done: herr_t H5C__verify_cork_tag_test(hid_t fid, haddr_t tag, hbool_t status) { - H5F_t * f; /* File Pointer */ - H5C_t * cache; /* Cache Pointer */ - H5C_tag_iter_vct_ctx_t ctx; /* Context for iterator callback */ - herr_t ret_value = SUCCEED; /* Return value */ + H5F_t * f; /* File Pointer */ + H5C_t * cache; /* Cache Pointer */ + H5C_tag_iter_vct_ctx_t ctx; /* Context for iterator callback */ + herr_t ret_value = SUCCEED; /* Return value */ /* Function enter macro */ FUNC_ENTER_PACKAGE /* Get file pointer */ - if(NULL == (f = (H5F_t *)H5I_object_verify(fid, H5I_FILE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") + if (NULL == (f = (H5F_t *)H5I_object_verify(fid, H5I_FILE))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file") /* Get cache pointer */ cache = f->shared->cache; @@ -152,10 +141,9 @@ H5C__verify_cork_tag_test(hid_t fid, haddr_t tag, hbool_t status) ctx.status = status; /* Iterate through tagged entries in the cache */ - if(H5C__iter_tagged_entries(cache, tag, FALSE, H5C__verify_cork_tag_test_cb, &ctx) < 0) + if (H5C__iter_tagged_entries(cache, tag, FALSE, H5C__verify_cork_tag_test_cb, &ctx) < 0) HGOTO_ERROR(H5E_CACHE, H5E_BADITER, FAIL, "iteration of tagged entries failed") done: FUNC_LEAVE_NOAPI(ret_value) } /* H5C__verify_cork_tag_test() */ - |