summaryrefslogtreecommitdiffstats
path: root/src/H5Gent.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-09-25 14:50:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-09-25 14:50:49 (GMT)
commit12e30dc9b284cae8dd821ffec93c344b7fb0d96b (patch)
treeca1e34bd719276349c4f75a7c38d79d361ce2025 /src/H5Gent.c
parentf9c3920d286b9d18156d1b7d85f14852345b5e74 (diff)
downloadhdf5-12e30dc9b284cae8dd821ffec93c344b7fb0d96b.zip
hdf5-12e30dc9b284cae8dd821ffec93c344b7fb0d96b.tar.gz
hdf5-12e30dc9b284cae8dd821ffec93c344b7fb0d96b.tar.bz2
[svn-r5947] Purpose:
Code cleanup Description: Clean up ID->name code: - Reformat to better match library coding standard - Changed several algorithms to be more efficient - Integrated into library more smoothly Platforms tested: eirene w/FORTRAN & C++ arabica w/FORTRAN modi4 w/FORTRAN & parallel sleipnir
Diffstat (limited to 'src/H5Gent.c')
-rw-r--r--src/H5Gent.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 30c082e..205f616 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -337,8 +337,7 @@ done:
FUNC_LEAVE(ret_value);
}
-
-
+
/*-------------------------------------------------------------------------
* Function: H5G_ent_copy
*
@@ -356,33 +355,28 @@ done:
*
*-------------------------------------------------------------------------
*/
-
herr_t
H5G_ent_copy( const H5G_entry_t *src, H5G_entry_t *dst )
{
+ herr_t ret_value=SUCCEED; /* Return value */
- herr_t ret_value=SUCCEED; /* Return value */
+ FUNC_ENTER_NOAPI(H5G_ent_copy, FAIL);
- FUNC_ENTER_NOAPI(H5G_ent_copy, FAIL);
+ /* check arguments */
+ assert( src );
+ assert( dst );
- assert( src );
- assert( dst );
+ /* Copy the top level information */
+ HDmemcpy(dst,src,sizeof(H5G_entry_t));
- HDmemcpy(dst,src,sizeof(H5G_entry_t));
+ /* Deep copy the names */
+ dst->name=H5MM_xstrdup(src->name);
+ dst->old_name=H5MM_xstrdup(src->old_name);
- if (src->name){
- dst->name=H5MM_strdup(src->name);
- }
- if (src->old_name){
- dst->old_name=H5MM_strdup(src->old_name);
- }
-
-
done:
- FUNC_LEAVE(SUCCEED);
+ FUNC_LEAVE(ret_value);
}
-
/*-------------------------------------------------------------------------
* Function: H5G_ent_debug