summaryrefslogtreecommitdiffstats
path: root/src/H5Dlayout.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-05-11 16:05:03 (GMT)
committerGitHub <noreply@github.com>2021-05-11 16:05:03 (GMT)
commit7d140b97fbd78d8071780e38e3e4287f6711f7f6 (patch)
tree919d01a7fea79441cc40b38ea616b8c51e200f4d /src/H5Dlayout.c
parent9023e98940d959aa974e655cc383fab0b0ed663c (diff)
downloadhdf5-7d140b97fbd78d8071780e38e3e4287f6711f7f6.zip
hdf5-7d140b97fbd78d8071780e38e3e4287f6711f7f6.tar.gz
hdf5-7d140b97fbd78d8071780e38e3e4287f6711f7f6.tar.bz2
Purges UFAIL from the library (#637)
* Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Dlayout.c')
-rw-r--r--src/H5Dlayout.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c
index 86c0bf6..6c4fc12 100644
--- a/src/H5Dlayout.c
+++ b/src/H5Dlayout.c
@@ -504,6 +504,7 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
H5HL_t * heap; /* Pointer to local heap for EFL file names */
size_t heap_size = H5HL_ALIGN(1);
size_t u;
+ size_t name_offset;
/* Determine size of heap needed to stored the file names */
for (u = 0; u < efl->nused; ++u)
@@ -518,24 +519,22 @@ H5D__layout_oh_create(H5F_t *file, H5O_t *oh, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_DATASET, H5E_CANTPROTECT, FAIL, "unable to protect EFL file name heap")
/* Insert "empty" name first */
- if (UFAIL == H5HL_insert(file, heap, (size_t)1, "")) {
+ if (H5HL_insert(file, heap, (size_t)1, "", &name_offset) < 0) {
H5HL_unprotect(heap);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap")
- } /* end if */
+ }
for (u = 0; u < efl->nused; ++u) {
- size_t offset; /* Offset of file name in heap */
-
/* Insert file name into heap */
- if (UFAIL ==
- (offset = H5HL_insert(file, heap, HDstrlen(efl->slot[u].name) + 1, efl->slot[u].name))) {
+ if (H5HL_insert(file, heap, HDstrlen(efl->slot[u].name) + 1, efl->slot[u].name, &name_offset) <
+ 0) {
H5HL_unprotect(heap);
HGOTO_ERROR(H5E_DATASET, H5E_CANTINSERT, FAIL, "unable to insert file name into heap")
- } /* end if */
+ }
/* Store EFL file name offset */
- efl->slot[u].name_offset = offset;
- } /* end for */
+ efl->slot[u].name_offset = name_offset;
+ }
/* Release the heap */
if (H5HL_unprotect(heap) < 0)