summaryrefslogtreecommitdiffstats
path: root/src/H5Gname.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-09-21 19:12:05 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-09-21 19:12:05 (GMT)
commit265652fe5466dc9e30d7bdf60a24a355852f0bfe (patch)
tree77320e2059f5ab2ba737e0cf5ab7eb6a09dc47f7 /src/H5Gname.c
parent1c8916ca0e9fe3447efe205094a2b5d3d5ccf8f6 (diff)
downloadhdf5-265652fe5466dc9e30d7bdf60a24a355852f0bfe.zip
hdf5-265652fe5466dc9e30d7bdf60a24a355852f0bfe.tar.gz
hdf5-265652fe5466dc9e30d7bdf60a24a355852f0bfe.tar.bz2
Normalization with vol_integration (property lists, file drivers,
other misc).
Diffstat (limited to 'src/H5Gname.c')
-rw-r--r--src/H5Gname.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/src/H5Gname.c b/src/H5Gname.c
index c1156ca..8aa0b45 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -1155,7 +1155,7 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
else {
/* We pass NULL as link pointer when we need to search all IDs */
search_group = search_dataset = search_datatype = TRUE;
- } /* end else */
+ }
/* Check if we need to operate on the objects affected */
if(search_group || search_dataset || search_datatype) {
@@ -1166,26 +1166,26 @@ H5G_name_replace(const H5O_link_t *lnk, H5G_names_op_t op, H5F_t *src_file,
src_file = H5F_PARENT(src_file);
/* Set up common information for callback */
- names.src_file = src_file;
- names.src_full_path_r = src_full_path_r;
- names.dst_file = dst_file;
- names.dst_full_path_r = dst_full_path_r;
- names.op = op;
+ names.src_file = src_file;
+ names.src_full_path_r = src_full_path_r;
+ names.dst_file = dst_file;
+ names.dst_full_path_r = dst_full_path_r;
+ names.op = op;
/* Search through group IDs */
if(search_group)
if(H5I_iterate(H5I_GROUP, H5G_name_replace_cb, &names, FALSE) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over groups")
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over groups")
/* Search through dataset IDs */
if(search_dataset)
if(H5I_iterate(H5I_DATASET, H5G_name_replace_cb, &names, FALSE) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datasets")
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datasets")
/* Search through datatype IDs */
if(search_datatype)
if(H5I_iterate(H5I_DATATYPE, H5G_name_replace_cb, &names, FALSE) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datatypes")
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over datatypes")
} /* end if */
} /* end if */
@@ -1269,10 +1269,11 @@ done:
*
* Purpose: Tries to figure out the path to an object from it's address
*
- * Return: returns size of path name, and copies it into buffer
- * pointed to by name if that buffer is big enough.
- * 0 if it cannot find the path
- * negative on failure.
+ * Return: Success: Returns size of path name, and copies it into buffer
+ * pointed to by name if that buffer is big enough.
+ * 0 if it cannot find the path
+ *
+ * Failure: -1
*
* Programmer: Quincey Koziol
* November 4 2007
@@ -1283,25 +1284,25 @@ ssize_t
H5G_get_name_by_addr(hid_t file, const H5O_loc_t *loc,
char *name, size_t size)
{
- H5G_gnba_iter_t udata; /* User data for iteration */
- H5G_loc_t root_loc; /* Root group's location */
- hbool_t found_obj = FALSE; /* If we found the object */
- herr_t status; /* Status from iteration */
- ssize_t ret_value = -1; /* Return value */
+ H5G_gnba_iter_t udata; /* User data for iteration */
+ H5G_loc_t root_loc; /* Root group's location */
+ hbool_t found_obj = FALSE; /* If we found the object */
+ herr_t status; /* Status from iteration */
+ ssize_t ret_value = -1; /* Return value */
/* Portably clear udata struct (before FUNC_ENTER) */
HDmemset(&udata, 0, sizeof(udata));
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI((-1))
/* Construct the link info for the file's root group */
if(H5G_loc(file, &root_loc) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get root group's location")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTGET, (-1), "can't get root group's location")
/* Check for root group being the object looked for */
if(root_loc.oloc->addr == loc->addr && root_loc.oloc->file == loc->file) {
if(NULL == (udata.path = H5MM_strdup("")))
- HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, FAIL, "can't duplicate path string")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTALLOC, (-1), "can't duplicate path string")
found_obj = TRUE;
} /* end if */
else {
@@ -1311,7 +1312,7 @@ H5G_get_name_by_addr(hid_t file, const H5O_loc_t *loc,
/* Visit all the links in the file */
if((status = H5G_visit(file, "/", H5_INDEX_NAME, H5_ITER_NATIVE, H5G_get_name_by_addr_cb, &udata)) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "group traversal failed while looking for object name")
+ HGOTO_ERROR(H5E_SYM, H5E_BADITER, (-1), "group traversal failed while looking for object name")
else if(status > 0)
found_obj = TRUE;
} /* end else */
@@ -1342,3 +1343,4 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_get_name_by_addr() */
+