diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2002-09-04 15:50:12 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2002-09-04 15:50:12 (GMT) |
commit | d3f2e1bdff0eb5276214270a4ead9a06d22febe7 (patch) | |
tree | a78f5f3054605ca3b07043dd526876c1cb0fe70e /src/H5G.c | |
parent | 46d9c62ba1181f8a803c7e26ab40307fb6f6d444 (diff) | |
download | hdf5-d3f2e1bdff0eb5276214270a4ead9a06d22febe7.zip hdf5-d3f2e1bdff0eb5276214270a4ead9a06d22febe7.tar.gz hdf5-d3f2e1bdff0eb5276214270a4ead9a06d22febe7.tar.bz2 |
[svn-r5911]
Purpose:
bug fix in 'ID to name' function
Description:
the function replace_name was only checking for immutable datatypes
Solution:
added a new function H5T_is_named, that checks for named datatypes
Platforms tested:
windows 2000, linux, solaris with Fortran
Diffstat (limited to 'src/H5G.c')
-rw-r--r-- | src/H5G.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -2594,6 +2594,8 @@ done: *------------------------------------------------------------------------- */ + + herr_t H5G_replace_name( int type, H5G_entry_t *loc, const char *src_name, const char *dst_name, int op ) { @@ -2774,15 +2776,15 @@ done: FUNC_ENTER_NOAPI(H5G_replace_ent, FAIL); assert(obj_ptr); - + /* avoid no named datatypes */ - if( names->obj_type==H5I_DATATYPE && H5T_is_immutable((H5T_t*)obj_ptr)) + if( names->obj_type==H5I_DATATYPE && !H5T_is_named((H5T_t*)obj_ptr)) { /* Do not exit loop */ ret_value = SUCCEED; goto done; } - + /* Get the symbol table entry */ switch(names->obj_type) { case H5I_GROUP: @@ -2800,9 +2802,8 @@ done: "unknown data object"); } - if( !ent) - goto done; - + assert( ent ); + /* Check if is a mounted file */ if(ent->file->mtab.parent) { |