diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2021-05-28 14:10:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 14:10:51 (GMT) |
commit | 2ddf5fbd92ebdb0d59e208d88f159eec8a1ffbf8 (patch) | |
tree | 40975e0846d101360a838d42e16f4687fed77f4a /src/H5Gcompact.c | |
parent | e22687912dbc6fcf4fff57e86e2cd5d75c81f81e (diff) | |
download | hdf5-2ddf5fbd92ebdb0d59e208d88f159eec8a1ffbf8.zip hdf5-2ddf5fbd92ebdb0d59e208d88f159eec8a1ffbf8.tar.gz hdf5-2ddf5fbd92ebdb0d59e208d88f159eec8a1ffbf8.tar.bz2 |
Much normalization with develop (#701)
* Brings CMake updates from develop
* Brings reduction in pedantic casts from develop
* 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>
* Removes gratuitous (double)x.yF casts (#632)
* Committing clang-format changes
* Removes gratuitous (double)x.yF casts
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Committing clang-format changes
* Cleans up a const warning left over from previous constification (#633)
* Committing clang-format changes
* Adds consts to a few global variables
* Cleans up a const warning left over from previous constification
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Formatted source
* Bring over some VOL registration changes
* VOL cleanup
* H5VL_request_status_t substitutions
* H5F.c cleanup
* Minor API tweaks from develop
* Moves H5G package init/teardown to H5Gint.c
* H5G cleanup
* H5M cleanup
* H5SM cleanup
* H5T cleanup
* H5R cleanup
* H5Lpublic.h cleanup
* H5L cleanup
* H5O cleanup
* H5A, H5CS, and H5AC cleanup
* Moved H5A init/teardown code to H5Aint.c
* Moves H5D I/O functions to H5D.c
* H5D cleanup
* Misc minor cleanup
* H5P close cleanup
* H5Tpublic.h cleanup
* Fixes err_compat test
* H5PLpublic.h cleanup
* Updates H5Ppublic.h
* H5Fpublic.h updates
* H5A.c cleanup
* Brings over H5Aexists and related changes
* Brings CMake shell testing changes from develop
* Close callback changes
* H5R and H5Tcommit normalization
* err_compat test works now
* H5O tweaks
* Updates VOL registration code
* Brings over H5VL_create_object
* H5Tconv.c reformatting
* H5T.c tweaks
* Brings datatype and reference updates from develop
* Brings VOL plugin loading changes from develop
* Brings event sets from develop
* Brings async functions over
* Tools changes
* Brings over many tools changes from develop
* Brings VOL flags from develop
* Fixes h5dump double/float tests
* Updates h5repack tests
* Brings h5diff test changes from develop
* Last h5dump changes
* Brings test changes from develop
* Committing clang-format changes
* Tidied h5_testing()
* Brings chunk iteration code + misc from develop
* Updates vds test
* Enables external link parallel test
* Brings updated property lists from develop
* H5G changes from develop
* H5MF cleanup
* Brings vfd_swmr test back into CMake
* Updates threadsafe test
* Updates plist test
* Brings recent changes from develop
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Gcompact.c')
-rw-r--r-- | src/H5Gcompact.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/H5Gcompact.c b/src/H5Gcompact.c index af188d8..a621f6e 100644 --- a/src/H5Gcompact.c +++ b/src/H5Gcompact.c @@ -52,7 +52,7 @@ typedef struct { /* upward */ H5O_link_t *lnk; /* Link struct to fill in */ - hbool_t found; /* Flag to indicate that the object was found */ + hbool_t * found; /* Pointer to flag to indicate that the object was found */ } H5G_iter_lkp_t; /* Private macros */ @@ -450,7 +450,7 @@ H5G__compact_lookup_cb(const void *_mesg, unsigned H5_ATTR_UNUSED idx, void *_ud } /* end if */ /* Indicate that the correct link was found */ - udata->found = TRUE; + *udata->found = TRUE; /* Stop iteration now */ HGOTO_DONE(H5_ITER_STOP) @@ -472,23 +472,24 @@ done: * *------------------------------------------------------------------------- */ -htri_t -H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, H5O_link_t *lnk) +herr_t +H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, hbool_t *found, H5O_link_t *lnk) { - H5G_iter_lkp_t udata; /* User data for iteration callback */ - H5O_mesg_operator_t op; /* Message operator */ - htri_t ret_value = FAIL; /* Return value */ + H5G_iter_lkp_t udata; /* User data for iteration callback */ + H5O_mesg_operator_t op; /* Message operator */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE /* check arguments */ - HDassert(lnk && oloc->file); HDassert(name && *name); + HDassert(found); + HDassert(lnk && oloc->file); /* Set up user data for iteration */ udata.name = name; udata.lnk = lnk; - udata.found = FALSE; + udata.found = found; /* Iterate through the link messages, adding them to the table */ op.op_type = H5O_MESG_OP_APP; @@ -496,9 +497,6 @@ H5G__compact_lookup(const H5O_loc_t *oloc, const char *name, H5O_link_t *lnk) if (H5O_msg_iterate(oloc, H5O_LINK_ID, &op, &udata) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "error iterating over link messages") - /* Determine if we found the link we were looking for */ - ret_value = (htri_t)udata.found; - done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5G__compact_lookup() */ |