summaryrefslogtreecommitdiffstats
path: root/src/H5Gint.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2023-08-02 13:39:15 (GMT)
committerGitHub <noreply@github.com>2023-08-02 13:39:15 (GMT)
commit2b0badb90e4e516d0758efbd8ec96449188c7249 (patch)
tree074e38039b95ca7121a0117069974eff52a04519 /src/H5Gint.c
parent56451503c55ef6e5f67fc3bb710f9e5b649b1af2 (diff)
downloadhdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.zip
hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.gz
hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.bz2
Made HGOTO_ERROR a do-while loop (#3308)
* Made HGOTO_ERROR a do-while loop
Diffstat (limited to 'src/H5Gint.c')
-rw-r--r--src/H5Gint.c148
1 files changed, 74 insertions, 74 deletions
diff --git a/src/H5Gint.c b/src/H5Gint.c
index d9716e2..1a9b335 100644
--- a/src/H5Gint.c
+++ b/src/H5Gint.c
@@ -129,7 +129,7 @@ H5G_init(void)
FUNC_ENTER_NOAPI(FAIL)
/* Initialize the ID group for the group IDs */
if (H5I_register_type(H5I_GROUP_CLS) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to initialize interface");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -212,11 +212,11 @@ H5G__close_cb(H5VL_object_t *grp_vol_obj, void **request)
/* Close the group */
if (H5VL_group_close(grp_vol_obj, H5P_DATASET_XFER_DEFAULT, request) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to close group")
+ HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "unable to close group");
/* Free the VOL object */
if (H5VL_free_object(grp_vol_obj) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "unable to free VOL object")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "unable to free VOL object");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -260,7 +260,7 @@ H5G__create_named(const H5G_loc_t *loc, const char *name, hid_t lcpl_id, hid_t g
/* Create the new group and link it to its parent group */
if (H5L_link_object(loc, name, &ocrt_info, lcpl_id) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create and link to group")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create and link to group");
assert(ocrt_info.new_obj);
/* Set the return value */
@@ -299,20 +299,20 @@ H5G__create(H5F_t *file, H5G_obj_create_t *gcrt_info)
/* create an open group */
if (NULL == (grp = H5FL_CALLOC(H5G_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
if (NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed");
/* Create the group object header */
if (H5G__obj_create(file, gcrt_info, &(grp->oloc) /*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group object header");
oloc_init = 1; /* Indicate that the object location information is valid */
/* Add group to list of open objects in file */
if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't incr object ref. count")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't incr object ref. count");
if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, TRUE) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects");
/* Set the count of times the object is opened */
grp->shared->fo_count = 1;
@@ -376,18 +376,18 @@ H5G__open_name(const H5G_loc_t *loc, const char *name)
/* Find the group object */
if (H5G_loc_find(loc, name, &grp_loc /*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "group not found")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "group not found");
loc_found = TRUE;
/* Check that the object found is the correct type */
if (H5O_obj_type(&grp_oloc, &obj_type) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't get object type")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, NULL, "can't get object type");
if (obj_type != H5O_TYPE_GROUP)
- HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, NULL, "not a group")
+ HGOTO_ERROR(H5E_SYM, H5E_BADTYPE, NULL, "not a group");
/* Open the group */
if (NULL == (grp = H5G_open(&grp_loc)))
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group");
/* Set return value */
ret_value = grp;
@@ -426,13 +426,13 @@ H5G_open(const H5G_loc_t *loc)
/* Allocate the group structure */
if (NULL == (grp = H5FL_CALLOC(H5G_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for group")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "can't allocate space for group");
/* Shallow copy (take ownership) of the group location object */
if (H5O_loc_copy_shallow(&(grp->oloc), loc->oloc) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy object location")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy object location");
if (H5G_name_copy(&(grp->path), loc->path, H5_COPY_SHALLOW) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy path")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, NULL, "can't copy path");
/* Check if group was already open */
if ((shared_fo = (H5G_shared_t *)H5FO_opened(grp->oloc.file, grp->oloc.addr)) == NULL) {
@@ -442,17 +442,17 @@ H5G_open(const H5G_loc_t *loc)
/* Open the group object */
if (H5G__open_oid(grp) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "not found")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, NULL, "not found");
/* Add group to list of open objects in file */
if (H5FO_insert(grp->oloc.file, grp->oloc.addr, grp->shared, FALSE) < 0) {
grp->shared = H5FL_FREE(H5G_shared_t, grp->shared);
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, NULL, "can't insert group into list of open objects");
} /* end if */
/* Increment object count for the object in the top file */
if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count");
/* Set open object count */
grp->shared->fo_count = 1;
@@ -468,12 +468,12 @@ H5G_open(const H5G_loc_t *loc)
if (H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) {
/* Open the object through this top file */
if (H5O_open(&(grp->oloc)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open object header");
} /* end if */
/* Increment object count for the object in the top file */
if (H5FO_top_incr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINC, NULL, "can't increment object count");
} /* end else */
/* Set return value */
@@ -514,16 +514,16 @@ H5G__open_oid(H5G_t *grp)
/* Allocate the shared information for the group */
if (NULL == (grp->shared = H5FL_CALLOC(H5G_shared_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
/* Grab the object header */
if (H5O_open(&(grp->oloc)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group");
obj_opened = TRUE;
/* Check if this object has the right message(s) to be treated as a group */
if ((H5O_msg_exists(&(grp->oloc), H5O_STAB_ID) <= 0) && (H5O_msg_exists(&(grp->oloc), H5O_LINFO_ID) <= 0))
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "not a group")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "not a group");
done:
if (ret_value < 0) {
@@ -565,25 +565,25 @@ H5G_close(H5G_t *grp)
/* Uncork cache entries with object address tag */
if (H5AC_cork(grp->oloc.file, grp->oloc.addr, H5AC__GET_CORKED, &corked) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to retrieve an object's cork status");
if (corked)
if (H5AC_cork(grp->oloc.file, grp->oloc.addr, H5AC__UNCORK, NULL) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTUNCORK, FAIL, "unable to uncork an object")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTUNCORK, FAIL, "unable to uncork an object");
/* Remove the group from the list of opened objects in the file */
if (H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object");
if (H5FO_delete(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't remove group from list of open objects")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't remove group from list of open objects");
if (H5O_close(&(grp->oloc), &file_closed) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close");
/* Evict group metadata if evicting on close */
if (!file_closed && H5F_SHARED(grp->oloc.file) && H5F_EVICT_ON_CLOSE(grp->oloc.file)) {
if (H5AC_flush_tagged_metadata(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to flush tagged metadata");
if (H5AC_evict_tagged_metadata(grp->oloc.file, grp->oloc.addr, FALSE) < 0)
- HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict tagged metadata")
+ HGOTO_ERROR(H5E_CACHE, H5E_CANTFLUSH, FAIL, "unable to evict tagged metadata");
} /* end if */
/* Free memory */
@@ -592,17 +592,17 @@ H5G_close(H5G_t *grp)
else {
/* Decrement the ref. count for this object in the top file */
if (H5FO_top_decr(grp->oloc.file, grp->oloc.addr) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't decrement count for object");
/* Check reference count for this object in the top file */
if (H5FO_top_count(grp->oloc.file, grp->oloc.addr) == 0) {
if (H5O_close(&(grp->oloc), NULL) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to close");
} /* end if */
else
/* Free object location (i.e. "unhold" the file if appropriate) */
if (H5O_loc_free(&(grp->oloc)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "problem attempting to free location")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "problem attempting to free location");
/* If this group is a mount point and the mount point is the last open
* reference to the group (i.e. fo_count == 1 now), then attempt to
@@ -611,13 +611,13 @@ H5G_close(H5G_t *grp)
if (grp->shared->mounted && grp->shared->fo_count == 1) {
/* Attempt to close down the file hierarchy */
if (H5F_try_close(grp->oloc.file, NULL) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close")
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCLOSEFILE, FAIL, "problem attempting file close");
} /* end if */
} /* end else */
if (H5G_name_free(&(grp->path)) < 0) {
grp = H5FL_FREE(H5G_t, grp);
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't free group entry name")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't free group entry name");
} /* end if */
grp = H5FL_FREE(H5G_t, grp);
@@ -809,7 +809,7 @@ H5G__iterate_cb(const H5O_link_t *lnk, void *_udata)
/* Retrieve the info for the link */
if (H5G_link_to_info(udata->link_loc, lnk, &info) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link");
/* Make the application callback */
ret_value = (udata->lnk_op.op_func.op_new)(udata->gid, lnk->name, &info, udata->op_data);
@@ -853,9 +853,9 @@ H5G_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter
* we can pass to the application-defined operator.
*/
if (NULL == (grp = H5G__open_name(loc, group_name)))
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group");
if ((gid = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group")
+ HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group");
/* Set up user data for callback */
udata.gid = gid;
@@ -866,7 +866,7 @@ H5G_iterate(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter
/* Call the real group iteration routine */
if ((ret_value =
H5G__obj_iterate(&(grp->oloc), idx_type, order, skip, last_lnk, H5G__iterate_cb, &udata)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "error iterating over links")
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "error iterating over links");
done:
/* Release the group opened */
@@ -938,7 +938,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Attempt to allocate larger buffer for path */
if (NULL == (new_path = H5MM_realloc(udata->path, len_needed)))
- HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate path string")
+ HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate path string");
udata->path = (char *)new_path;
udata->path_buf_size = len_needed;
} /* end if */
@@ -950,7 +950,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Construct the link info from the link message */
if (H5G_link_to_info(udata->curr_loc->oloc, lnk, &info) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get info for link");
/* Make the application callback */
ret_value = (udata->op)(udata->gid, udata->path, &info, udata->op_data);
@@ -967,7 +967,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Find the object using the LAPL passed in */
/* (Correctly handles mounted files) */
if (H5G_loc_find(udata->curr_loc, lnk->name, &obj_loc /*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5_ITER_ERROR, "object not found");
obj_found = TRUE;
/* Construct unique "position" for this object */
@@ -981,7 +981,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Get the object's reference count and type */
if (H5O_get_rc_and_type(&obj_oloc, &rc, &otype) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "unable to get object info");
/* If its ref count is > 1, we add it to the list of visited objects */
/* (because it could come up again during traversal) */
@@ -990,7 +990,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Allocate new object "position" node */
if ((new_node = H5FL_MALLOC(H5_obj_t)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node")
+ HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, H5_ITER_ERROR, "can't allocate object node");
/* Set node information */
*new_node = obj_pos;
@@ -998,7 +998,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Add to list of visited objects */
if (H5SL_insert(udata->visited, new_node, new_node) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5_ITER_ERROR,
- "can't insert object node into visited list")
+ "can't insert object node into visited list");
} /* end if */
/* If it's a group, we recurse into it */
@@ -1015,7 +1015,7 @@ H5G__visit_cb(const H5O_link_t *lnk, void *_udata)
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(&obj_oloc, &linfo)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "can't check for link info message")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5_ITER_ERROR, "can't check for link info message");
if (linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
if (idx_type == H5_INDEX_CRT_ORDER) {
@@ -1104,19 +1104,19 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
/* Check args */
if (!loc)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc parameter cannot be NULL")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "loc parameter cannot be NULL");
/* Open the group to begin visiting within */
if (NULL == (grp = H5G__open_name(loc, group_name)))
- HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open group");
/* Register an ID for the starting group */
if ((gid = H5VL_wrap_register(H5I_GROUP, grp, TRUE)) < 0)
- HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group")
+ HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, FAIL, "unable to register group");
/* Get the location of the starting group */
if (H5G_loc(gid, &start_loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location");
/* Set up user data */
udata.gid = gid;
@@ -1128,17 +1128,17 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
/* Allocate space for the path name */
if (NULL == (udata.path = H5MM_strdup("")))
- HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate path name buffer")
+ HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate path name buffer");
udata.path_buf_size = 1;
udata.curr_path_len = 0;
/* Create skip list to store visited object information */
if ((udata.visited = H5SL_create(H5SL_TYPE_OBJ, NULL)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTCREATE, FAIL, "can't create skip list for visited objects");
/* Get the group's reference count */
if (H5O_get_rc_and_type(&grp->oloc, &rc, NULL) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object info")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object info");
/* If its ref count is > 1, we add it to the list of visited objects */
/* (because it could come up again during traversal) */
@@ -1147,7 +1147,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
/* Allocate new object "position" node */
if ((obj_pos = H5FL_MALLOC(H5_obj_t)) == NULL)
- HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate object node")
+ HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate object node");
/* Construct unique "position" for this object */
H5F_GET_FILENO(grp->oloc.file, obj_pos->fileno);
@@ -1155,12 +1155,12 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
/* Add to list of visited objects */
if (H5SL_insert(udata.visited, obj_pos, obj_pos) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert object node into visited list")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "can't insert object node into visited list");
} /* end if */
/* Attempt to get the link info for this group */
if ((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't check for link info message");
if (linfo_exists) {
/* Check for creation order tracking, if creation order index lookup requested */
if (idx_type == H5_INDEX_CRT_ORDER) {
@@ -1182,7 +1182,7 @@ H5G_visit(H5G_loc_t *loc, const char *group_name, H5_index_t idx_type, H5_iter_o
/* Call the link iteration routine */
if ((ret_value =
H5G__obj_iterate(&(grp->oloc), idx_type, order, (hsize_t)0, NULL, H5G__visit_cb, &udata)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't visit links")
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't visit links");
done:
/* Release user data resources */
@@ -1230,53 +1230,53 @@ H5G_get_create_plist(const H5G_t *grp)
/* Copy the default group creation property list */
if (NULL == (gcpl_plist = (H5P_genplist_t *)H5I_object(H5P_LST_GROUP_CREATE_ID_g)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get default group creation property list")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get default group creation property list");
if ((new_gcpl_id = H5P_copy_plist(gcpl_plist, TRUE)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to copy the creation property list");
if (NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_gcpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get property list")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "can't get property list");
/* Retrieve any object creation properties */
if (H5O_get_create_plist(&grp->oloc, new_plist) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "can't get object creation info");
/* Check for the group having a group info message */
if ((ginfo_exists = H5O_msg_exists(&(grp->oloc), H5O_GINFO_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header");
if (ginfo_exists) {
H5O_ginfo_t ginfo; /* Group info message */
/* Read the group info */
if (NULL == H5O_msg_read(&(grp->oloc), H5O_GINFO_ID, &ginfo))
- HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get group info")
+ HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get group info");
/* Set the group info for the property list */
if (H5P_set(new_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set group info")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set group info");
} /* end if */
/* Check for the group having a link info message */
if ((linfo_exists = H5G__obj_get_linfo(&(grp->oloc), &linfo)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, H5I_INVALID_HID, "unable to read object header");
if (linfo_exists) {
/* Set the link info for the property list */
if (H5P_set(new_plist, H5G_CRT_LINK_INFO_NAME, &linfo) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link info")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link info");
} /* end if */
/* Check for the group having a pipeline message */
if ((pline_exists = H5O_msg_exists(&(grp->oloc), H5O_PLINE_ID)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to read object header")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5I_INVALID_HID, "unable to read object header");
if (pline_exists) {
H5O_pline_t pline; /* Pipeline message */
/* Read the pipeline */
if (NULL == H5O_msg_read(&(grp->oloc), H5O_PLINE_ID, &pline))
- HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get link pipeline")
+ HGOTO_ERROR(H5E_SYM, H5E_BADMESG, H5I_INVALID_HID, "can't get link pipeline");
/* Set the pipeline for the property list */
if (H5P_poke(new_plist, H5O_CRT_PIPELINE_NAME, &pline) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link pipeline")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5I_INVALID_HID, "can't set link pipeline");
} /* end if */
/* Set the return value */
@@ -1323,12 +1323,12 @@ H5G__get_info_by_name(const H5G_loc_t *loc, const char *name, H5G_info_t *grp_in
/* Find the group object */
if (H5G_loc_find(loc, name, &grp_loc /*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found");
loc_found = TRUE;
/* Retrieve the group's information */
if (H5G__obj_info(grp_loc.oloc, grp_info /*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info");
done:
/* Clean up */
@@ -1370,12 +1370,12 @@ H5G__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id
/* Find the object's location, according to the order in the index */
if (H5G_loc_find_by_idx(loc, group_name, idx_type, order, n, &grp_loc /*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found")
+ HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "group not found");
loc_found = TRUE;
/* Retrieve the group's information */
if (H5G__obj_info(grp_loc.oloc, grp_info /*out*/) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info");
done:
/* Clean up */