Skip to content

Instantly share code, notes, and snippets.

@houjun
Last active November 8, 2021 22:57
Show Gist options
  • Save houjun/208903d8e6a64e2670754d8ca0f6b548 to your computer and use it in GitHub Desktop.
Save houjun/208903d8e6a64e2670754d8ca0f6b548 to your computer and use it in GitHub Desktop.
HDF5 async patch
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 6ca4204168..31b4977b15 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -471,13 +471,13 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name)
/* If found the attribute is already opened, make a copy of it to share the
* object information. If not, open attribute as a new object
*/
- if ((found_open_attr = H5O__attr_find_opened_attr(loc, &exist_attr, name)) < 0)
- HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "failed in finding opened attribute")
- else if (found_open_attr == TRUE) {
- if (NULL == (opened_attr = H5A__copy(NULL, exist_attr)))
- HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy existing attribute")
- } /* end else if */
- else {
+ /* if ((found_open_attr = H5O__attr_find_opened_attr(loc, &exist_attr, name)) < 0) */
+ /* HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, NULL, "failed in finding opened attribute") */
+ /* else if (found_open_attr == TRUE) { */
+ /* if (NULL == (opened_attr = H5A__copy(NULL, exist_attr))) */
+ /* HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "can't copy existing attribute") */
+ /* } /1* end else if *1/ */
+ /* else { */
/* Check for attributes in dense storage */
if (H5F_addr_defined(ainfo.fheap_addr)) {
/* Open attribute with dense storage */
@@ -510,7 +510,7 @@ H5O__attr_open_by_name(const H5O_loc_t *loc, const char *name)
/* Mark datatype as being on disk now */
if (H5T_set_loc(opened_attr->shared->dt, H5F_VOL_OBJ(loc->file), H5T_LOC_DISK) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, NULL, "invalid datatype location")
- } /* end else */
+ /* } /1* end else *1/ */
/* Set return value */
ret_value = opened_attr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment