diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-09-25 14:50:49 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-09-25 14:50:49 (GMT) |
commit | 12e30dc9b284cae8dd821ffec93c344b7fb0d96b (patch) | |
tree | ca1e34bd719276349c4f75a7c38d79d361ce2025 /src/H5D.c | |
parent | f9c3920d286b9d18156d1b7d85f14852345b5e74 (diff) | |
download | hdf5-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/H5D.c')
-rw-r--r-- | src/H5D.c | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -1905,8 +1905,8 @@ done: * Quincey Koziol, 12 Oct 1998 * Moved guts of function into H5D_open_oid * - * Pedro Vicente, <pvn@ncsa.uiuc.edu> 18 Sep 2002 - * Added `id to name' support. + * Pedro Vicente, <pvn@ncsa.uiuc.edu> 18 Sep 2002 + * Added `id to name' support. * *------------------------------------------------------------------------- */ @@ -1935,10 +1935,6 @@ H5D_open(H5G_entry_t *loc, const char *name) ret_value = dataset; done: - - /*Free the ID to name buffer */ - H5G_free_ent_name(&ent); - FUNC_LEAVE(ret_value); } @@ -1965,8 +1961,8 @@ done: * Feb 26, 2002 * A new fill value message and two new properties are added. * - * Pedro Vicente, <pvn@ncsa.uiuc.edu> 22 Aug 2002 - * Added a deep copy of the symbol table entry + * Pedro Vicente, <pvn@ncsa.uiuc.edu> 22 Aug 2002 + * Added a deep copy of the symbol table entry * *------------------------------------------------------------------------- */ @@ -1992,10 +1988,8 @@ H5D_open_oid(H5G_entry_t *ent) if(NULL==(dataset = H5D_new(H5P_DEFAULT))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); - /* Deep copy of the symbol table entry */ - if (H5G_ent_copy(ent,&(dataset->ent))<0) - HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, NULL, "unable to copy entry"); - + /* Shallow copy (take ownership) of the group entry object */ + HDmemcpy(&(dataset->ent),ent,sizeof(H5G_entry_t)); /* Find the dataset object */ if (H5O_open(&(dataset->ent)) < 0) |