summaryrefslogtreecommitdiffstats
path: root/src/H5Gname.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-11-11 05:23:53 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-11-11 05:23:53 (GMT)
commite53f3daf610359bc61b8da499c66495b0476b68d (patch)
tree975e4e306b34e4d4a707947068bac14b612f28c3 /src/H5Gname.c
parentf5eebb7d17a356fb0eaca4fce91f710155f89f8c (diff)
downloadhdf5-e53f3daf610359bc61b8da499c66495b0476b68d.zip
hdf5-e53f3daf610359bc61b8da499c66495b0476b68d.tar.gz
hdf5-e53f3daf610359bc61b8da499c66495b0476b68d.tar.bz2
[svn-r12892] Description:
Add H5Rget_name routine and tests... Tested on: FreeBSD/32 4.11 (sleipnir) Linux/32 2.4 (heping) Linux/64 2.4 (mir)
Diffstat (limited to 'src/H5Gname.c')
-rw-r--r--src/H5Gname.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5Gname.c b/src/H5Gname.c
index efa7865..9b8eacf 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -83,8 +83,6 @@ static herr_t H5G_name_move_path(H5RS_str_t **path_r_ptr,
static int H5G_name_replace_cb(void *obj_ptr, hid_t obj_id, void *key);
static herr_t H5G_refname_iterator(hid_t group, const char *name, void *_iter);
static herr_t H5G_free_ref_path_node(void *item, void *key, void *operator_data/*in,out*/);
-static ssize_t H5G_get_refobj_name(hid_t fid, hid_t dxpl_id, const H5O_loc_t *loc,
- char* name, size_t size);
/*-------------------------------------------------------------------------
@@ -462,8 +460,10 @@ H5G_get_name(hid_t id, char *name/*out*/, size_t size, hid_t dxpl_id)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve file ID")
/* Search for name of object */
- if((len = H5G_get_refobj_name(file, dxpl_id, loc.oloc, name, size)) < 0)
+ if((len = H5G_get_refobj_name(file, dxpl_id, loc.oloc, name, size)) < 0) {
+ H5I_dec_ref(file);
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't determine name")
+ } /* end if */
/* Close file ID used for search */
if(H5I_dec_ref(file) < 0)
@@ -1194,7 +1194,7 @@ H5G_free_ref_path_node(void *item, void UNUSED *key, void UNUSED *operator_data/
*
*-------------------------------------------------------------------------
*/
-static ssize_t
+ssize_t
H5G_get_refobj_name(hid_t file, hid_t dxpl_id, const H5O_loc_t *loc,
char *name, size_t size)
{
@@ -1202,7 +1202,7 @@ H5G_get_refobj_name(hid_t file, hid_t dxpl_id, const H5O_loc_t *loc,
herr_t status; /* Status from iteration */
ssize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT(H5G_get_refobj_name)
+ FUNC_ENTER_NOAPI(H5G_get_refobj_name, FAIL)
/* Set up user data for iterator */
udata.file = file;