summaryrefslogtreecommitdiffstats
path: root/src/H5Dvirtual.c
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-07-27 17:28:11 (GMT)
committerGitHub <noreply@github.com>2022-07-27 17:28:11 (GMT)
commita0a1959c58973095194f2d9ac5f9b13bb7b14fb4 (patch)
tree3f36cbd14d9ede9f00c4c26affb9ecab5d1a860f /src/H5Dvirtual.c
parentf0690f13fb914ff39a32d88801eabcef759a0163 (diff)
downloadhdf5-a0a1959c58973095194f2d9ac5f9b13bb7b14fb4.zip
hdf5-a0a1959c58973095194f2d9ac5f9b13bb7b14fb4.tar.gz
hdf5-a0a1959c58973095194f2d9ac5f9b13bb7b14fb4.tar.bz2
clang 13 format #1933 (#1939)
Diffstat (limited to 'src/H5Dvirtual.c')
-rw-r--r--src/H5Dvirtual.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 2f60c16..71e35b3 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -92,13 +92,13 @@ static herr_t H5D__virtual_flush(H5D_t *dset);
/* Other functions */
static herr_t H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *virtual_ent,
H5O_storage_virtual_srcdset_t *source_dset);
-static herr_t H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t * virtual_ent,
+static herr_t H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent,
H5O_storage_virtual_srcdset_t *source_dset);
static herr_t H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf,
size_t *buf_size);
static herr_t H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst,
- H5O_storage_virtual_name_seg_t * src);
-static herr_t H5D__virtual_build_source_name(char * source_name,
+ H5O_storage_virtual_name_seg_t *src);
+static herr_t H5D__virtual_build_source_name(char *source_name,
const H5O_storage_virtual_name_seg_t *parsed_name,
size_t static_strlen, size_t nsubs, hsize_t blockno,
char **built_name);
@@ -239,7 +239,7 @@ H5D_virtual_check_mapping_post(const H5O_storage_virtual_ent_t *ent)
{
hsize_t nelmts_vs; /* Number of elements in virtual selection */
hsize_t nelmts_ss; /* Number of elements in source selection */
- H5S_t * tmp_space = NULL; /* Temporary dataspace */
+ H5S_t *tmp_space = NULL; /* Temporary dataspace */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -282,9 +282,9 @@ H5D_virtual_check_mapping_post(const H5O_storage_virtual_ent_t *ent)
else
/* Make sure there are no printf substitutions */
if ((ent->psfn_nsubs > 0) || (ent->psdn_nsubs > 0))
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL,
- "printf specifier(s) in source name(s) without an unlimited virtual selection and "
- "limited source selection")
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL,
+ "printf specifier(s) in source name(s) without an unlimited virtual selection and "
+ "limited source selection")
done:
/* Free temporary space */
@@ -313,7 +313,7 @@ done:
herr_t
H5D_virtual_update_min_dims(H5O_layout_t *layout, size_t idx)
{
- H5O_storage_virtual_t * virt = &layout->storage.u.virt;
+ H5O_storage_virtual_t *virt = &layout->storage.u.virt;
H5O_storage_virtual_ent_t *ent = &virt->list[idx];
H5S_sel_type sel_type;
int rank;
@@ -421,9 +421,9 @@ herr_t
H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout)
{
H5O_storage_virtual_t *virt = &layout->storage.u.virt;
- uint8_t * heap_block = NULL; /* Block to add to heap */
- size_t * str_size = NULL; /* Array for VDS entry string lengths */
- uint8_t * heap_block_p; /* Pointer into the heap block, while encoding */
+ uint8_t *heap_block = NULL; /* Block to add to heap */
+ size_t *str_size = NULL; /* Array for VDS entry string lengths */
+ uint8_t *heap_block_p; /* Pointer into the heap block, while encoding */
size_t block_size; /* Total size of block needed */
hsize_t tmp_nentries; /* Temp. variable for # of VDS entries */
uint32_t chksum; /* Checksum for heap data */
@@ -558,10 +558,10 @@ herr_t
H5D__virtual_copy_layout(H5O_layout_t *layout)
{
H5O_storage_virtual_ent_t *orig_list = NULL;
- H5O_storage_virtual_t * virt = &layout->storage.u.virt;
+ H5O_storage_virtual_t *virt = &layout->storage.u.virt;
hid_t orig_source_fapl;
hid_t orig_source_dapl;
- H5P_genplist_t * plist;
+ H5P_genplist_t *plist;
size_t i;
herr_t ret_value = SUCCEED;
@@ -892,7 +892,7 @@ static herr_t
H5D__virtual_open_source_dset(const H5D_t *vdset, H5O_storage_virtual_ent_t *virtual_ent,
H5O_storage_virtual_srcdset_t *source_dset)
{
- H5F_t * src_file = NULL; /* Source file */
+ H5F_t *src_file = NULL; /* Source file */
hbool_t src_file_open = FALSE; /* Whether we have opened and need to close src_file */
herr_t ret_value = SUCCEED; /* Return value */
@@ -983,7 +983,7 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t * virtual_ent,
+H5D__virtual_reset_source_dset(H5O_storage_virtual_ent_t *virtual_ent,
H5O_storage_virtual_srcdset_t *source_dset)
{
herr_t ret_value = SUCCEED; /* Return value */
@@ -1096,7 +1096,7 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, s
/* Extend buffer if necessary */
if ((p_offset + src_len + (size_t)1) > *buf_size) {
- char * tmp_buf;
+ char *tmp_buf;
size_t tmp_buf_size;
/* Calculate new size of buffer */
@@ -1141,14 +1141,14 @@ herr_t
H5D_virtual_parse_source_name(const char *source_name, H5O_storage_virtual_name_seg_t **parsed_name,
size_t *static_strlen, size_t *nsubs)
{
- H5O_storage_virtual_name_seg_t * tmp_parsed_name = NULL;
+ H5O_storage_virtual_name_seg_t *tmp_parsed_name = NULL;
H5O_storage_virtual_name_seg_t **tmp_parsed_name_p = &tmp_parsed_name;
size_t tmp_static_strlen;
size_t tmp_strlen;
size_t tmp_nsubs = 0;
- const char * p;
- const char * pct;
- char * name_seg_p = NULL;
+ const char *p;
+ const char *pct;
+ char *name_seg_p = NULL;
size_t name_seg_size = 0;
herr_t ret_value = SUCCEED; /* Return value */
@@ -1257,8 +1257,8 @@ done:
static herr_t
H5D__virtual_copy_parsed_name(H5O_storage_virtual_name_seg_t **dst, H5O_storage_virtual_name_seg_t *src)
{
- H5O_storage_virtual_name_seg_t * tmp_dst = NULL;
- H5O_storage_virtual_name_seg_t * p_src = src;
+ H5O_storage_virtual_name_seg_t *tmp_dst = NULL;
+ H5O_storage_virtual_name_seg_t *p_src = src;
H5O_storage_virtual_name_seg_t **p_dst = &tmp_dst;
herr_t ret_value = SUCCEED;
@@ -1345,7 +1345,7 @@ static herr_t
H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name_seg_t *parsed_name,
size_t static_strlen, size_t nsubs, hsize_t blockno, char **built_name)
{
- char * tmp_name = NULL; /* Name buffer */
+ char *tmp_name = NULL; /* Name buffer */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_STATIC
@@ -1363,7 +1363,7 @@ H5D__virtual_build_source_name(char *source_name, const H5O_storage_virtual_name
} /* end if */
else {
const H5O_storage_virtual_name_seg_t *name_seg = parsed_name;
- char * p;
+ char *p;
hsize_t blockno_down = blockno;
size_t blockno_len = 1;
size_t name_len;
@@ -2187,7 +2187,7 @@ herr_t
H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
{
H5O_storage_virtual_t *storage; /* Convenience pointer */
- H5P_genplist_t * dapl; /* Data access property list object pointer */
+ H5P_genplist_t *dapl; /* Data access property list object pointer */
hssize_t old_offset[H5O_LAYOUT_NDIMS]; /* Old selection offset (unused) */
size_t i; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2249,7 +2249,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
/* Retrieve VDS file FAPL to layout */
if (storage->source_fapl <= 0) {
- H5P_genplist_t * source_fapl = NULL; /* Source file FAPL */
+ H5P_genplist_t *source_fapl = NULL; /* Source file FAPL */
H5F_close_degree_t close_degree = H5F_CLOSE_WEAK; /* Close degree for source files */
if ((storage->source_fapl = H5F_get_access_plist(f, FALSE)) < 0)
@@ -2265,7 +2265,7 @@ H5D__virtual_init(H5F_t *f, const H5D_t *dset, hid_t dapl_id)
} /* end if */
#ifndef NDEBUG
else {
- H5P_genplist_t * source_fapl = NULL; /* Source file FAPL */
+ H5P_genplist_t *source_fapl = NULL; /* Source file FAPL */
H5F_close_degree_t close_degree; /* Close degree for source files */
/* Get property list pointer */
@@ -2676,10 +2676,10 @@ H5D__virtual_post_io(H5O_storage_virtual_t *storage)
else
/* Close projected memory space */
if (storage->list[i].source_dset.projected_mem_space) {
- if (H5S_close(storage->list[i].source_dset.projected_mem_space) < 0)
- HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space")
- storage->list[i].source_dset.projected_mem_space = NULL;
- } /* end if */
+ if (H5S_close(storage->list[i].source_dset.projected_mem_space) < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "can't close temporary space")
+ storage->list[i].source_dset.projected_mem_space = NULL;
+ } /* end if */
/* Note the lack of a done: label. This is because there are no HGOTO_ERROR
* calls. If one is added, a done: label must also be added */
@@ -2764,7 +2764,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsiz
{
H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */
hsize_t tot_nelmts; /* Total number of elements mapped to mem_space */
- H5S_t * fill_space = NULL; /* Space to fill with fill value */
+ H5S_t *fill_space = NULL; /* Space to fill with fill value */
size_t i, j; /* Local index variables */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2805,7 +2805,7 @@ H5D__virtual_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsiz
else
/* Read from source dataset */
if (H5D__virtual_read_one(io_info, type_info, file_space, &storage->list[i].source_dset) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset")
+ HGOTO_ERROR(H5E_DATASET, H5E_READERROR, FAIL, "unable to read source dataset")
} /* end for */
/* Fill unmapped part of buffer with fill value */
@@ -3002,7 +3002,7 @@ H5D__virtual_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsi
else
/* Write to source dataset */
if (H5D__virtual_write_one(io_info, type_info, file_space, &storage->list[i].source_dset) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset")
+ HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, FAIL, "unable to write to source dataset")
} /* end for */
done:
@@ -3074,7 +3074,7 @@ done:
herr_t
H5D__virtual_hold_source_dset_files(const H5D_t *dset, H5D_virtual_held_file_t **head)
{
- H5O_storage_virtual_t * storage; /* Convenient pointer into layout struct */
+ H5O_storage_virtual_t *storage; /* Convenient pointer into layout struct */
H5D_virtual_held_file_t *tmp; /* Temporary held file node */
size_t i; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -3223,9 +3223,9 @@ H5D__virtual_refresh_source_dsets(H5D_t *dset)
else
/* Check if source dataset is open */
if (storage->list[i].source_dset.dset)
- /* Refresh source dataset */
- if (H5D__virtual_refresh_source_dset(&storage->list[i].source_dset.dset) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh source dataset")
+ /* Refresh source dataset */
+ if (H5D__virtual_refresh_source_dset(&storage->list[i].source_dset.dset) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTFLUSH, FAIL, "unable to refresh source dataset")
done:
FUNC_LEAVE_NOAPI(ret_value)