diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:27:10 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-09-30 14:27:10 (GMT) |
commit | b2d661b508a7fc7a2592c13bc6bdc175551f075d (patch) | |
tree | 13baeb0d83a7c2a4c6299993c182b1227c2f6114 /src/H5Dtest.c | |
parent | 29ab58b58dce556639ea3154e262895773a8a8df (diff) | |
download | hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2 |
Clang-format of source files
Diffstat (limited to 'src/H5Dtest.c')
-rw-r--r-- | src/H5Dtest.c | 84 |
1 files changed, 35 insertions, 49 deletions
diff --git a/src/H5Dtest.c b/src/H5Dtest.c index 7c791d4..67b3a6c 100644 --- a/src/H5Dtest.c +++ b/src/H5Dtest.c @@ -21,46 +21,38 @@ /* Module Setup */ /****************/ -#include "H5Dmodule.h" /* This source code file is part of the H5D module */ -#define H5D_TESTING /*suppress warning about H5D testing funcs*/ - +#include "H5Dmodule.h" /* This source code file is part of the H5D module */ +#define H5D_TESTING /*suppress warning about H5D testing funcs*/ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Dpkg.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5Iprivate.h" /* IDs */ -#include "H5VLprivate.h" /* Virtual Object Layer */ - +#include "H5private.h" /* Generic Functions */ +#include "H5Dpkg.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5Iprivate.h" /* IDs */ +#include "H5VLprivate.h" /* Virtual Object Layer */ /****************/ /* Local Macros */ /****************/ - /******************/ /* Local Typedefs */ /******************/ - /********************/ /* Local Prototypes */ /********************/ - /*********************/ /* Package Variables */ /*********************/ - /*******************/ /* Local Variables */ /*******************/ - - /*-------------------------------------------------------------------------- NAME H5D__layout_version_test @@ -83,23 +75,22 @@ herr_t H5D__layout_version_test(hid_t did, unsigned *version) { - H5D_t *dset; /* Pointer to dataset to query */ + H5D_t *dset; /* Pointer to dataset to query */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_PACKAGE /* Check args */ - if(NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) + if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") - if(version) + if (version) *version = dset->shared->layout.version; done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5D__layout_version_test() */ +} /* H5D__layout_version_test() */ - /*-------------------------------------------------------------------------- NAME H5D__layout_contig_size_test @@ -122,25 +113,24 @@ done: herr_t H5D__layout_contig_size_test(hid_t did, hsize_t *size) { - H5D_t *dset; /* Pointer to dataset to query */ + H5D_t *dset; /* Pointer to dataset to query */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_PACKAGE /* Check args */ - if(NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) + if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") - if(size) { + if (size) { HDassert(dset->shared->layout.type == H5D_CONTIGUOUS); *size = dset->shared->layout.storage.u.contig.size; } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5D__layout_contig_size_test() */ +} /* H5D__layout_contig_size_test() */ - /*-------------------------------------------------------------------------- NAME H5D__layout_compact_dirty_test @@ -169,19 +159,18 @@ H5D__layout_compact_dirty_test(hid_t did, hbool_t *dirty) FUNC_ENTER_PACKAGE /* Check args */ - if(NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) + if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) HGOTO_ERROR(H5E_DATASET, H5E_BADTYPE, FAIL, "not a dataset") - if(dirty) { + if (dirty) { HDassert(dset->shared->layout.type == H5D_COMPACT); *dirty = dset->shared->layout.storage.u.compact.dirty; } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5D__layout_compact_dirty_test() */ +} /* H5D__layout_compact_dirty_test() */ - /*-------------------------------------------------------------------------- NAME H5D__layout_type_test @@ -204,25 +193,24 @@ done: herr_t H5D__layout_type_test(hid_t did, H5D_layout_t *layout_type) { - H5D_t *dset; /* Pointer to dataset to query */ - herr_t ret_value = SUCCEED; /* return value */ + H5D_t *dset; /* Pointer to dataset to query */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_PACKAGE HDassert(layout_type); /* Check args */ - if(NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) + if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") - if(layout_type) + if (layout_type) *layout_type = dset->shared->layout.type; done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5D__layout_type_test() */ +} /* H5D__layout_type_test() */ - /*-------------------------------------------------------------------------- NAME H5D__layout_idx_type_test @@ -245,25 +233,24 @@ done: herr_t H5D__layout_idx_type_test(hid_t did, H5D_chunk_index_t *idx_type) { - H5D_t *dset; /* Pointer to dataset to query */ - herr_t ret_value = SUCCEED; /* return value */ + H5D_t *dset; /* Pointer to dataset to query */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_PACKAGE /* Check args */ - if(NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) + if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") - if(dset->shared->layout.type != H5D_CHUNKED) + if (dset->shared->layout.type != H5D_CHUNKED) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "dataset is not chunked") - if(idx_type) + if (idx_type) *idx_type = dset->shared->layout.u.chunk.idx_type; done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5D__layout_idx_type_test() */ +} /* H5D__layout_idx_type_test() */ - /*-------------------------------------------------------------------------- NAME H5D__current_cache_size_test @@ -286,26 +273,25 @@ done: herr_t H5D__current_cache_size_test(hid_t did, size_t *nbytes_used, int *nused) { - H5D_t *dset; /* Pointer to dataset to query */ - herr_t ret_value = SUCCEED; /* return value */ + H5D_t *dset; /* Pointer to dataset to query */ + herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_PACKAGE /* Check args */ - if(NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) + if (NULL == (dset = (H5D_t *)H5VL_object_verify(did, H5I_DATASET))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset") - if(nbytes_used) { + if (nbytes_used) { HDassert(dset->shared->layout.type == H5D_CHUNKED); *nbytes_used = dset->shared->cache.chunk.nbytes_used; } /* end if */ - if(nused) { + if (nused) { HDassert(dset->shared->layout.type == H5D_CHUNKED); *nused = dset->shared->cache.chunk.nused; } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5D__current_cache_size_test() */ - +} /* H5D__current_cache_size_test() */ |