summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-12-26 05:28:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-12-26 05:28:18 (GMT)
commit83929ea716220890e41f923566aa5c89e8e735d3 (patch)
tree22193da0d9129fc7c06a57db35b2f4a57458cf50 /src/H5D.c
parentdb551ec15e771b4536c35cc6f3eabb7d28681510 (diff)
downloadhdf5-83929ea716220890e41f923566aa5c89e8e735d3.zip
hdf5-83929ea716220890e41f923566aa5c89e8e735d3.tar.gz
hdf5-83929ea716220890e41f923566aa5c89e8e735d3.tar.bz2
[svn-r11838] Purpose:
Bug fix Description: Retrieving an object's name could fail (in various ways) under certain circumstances (mostly having to do with mounted files). Solution: Re-write & simplify "get object name" code to fix error in a better way than adding yet another hack to the previous pile of hacks... :-) Platforms tested: FreeBSD 4.11 (sleipnir) h5committest
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 2eeba41..3510f28 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -2384,11 +2384,11 @@ H5D_open(const H5G_loc_t *loc, hid_t dxpl_id)
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed")
/* Shallow copy (take ownership) of the object location object */
- if(H5O_loc_copy(&(dataset->oloc), loc->oloc, H5O_COPY_SHALLOW) < 0)
+ if(H5O_loc_copy(&(dataset->oloc), loc->oloc, H5_COPY_SHALLOW) < 0)
HGOTO_ERROR (H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy object location")
/* Shallow copy (take ownership) of the group hier. path */
- if(H5G_name_copy(&(dataset->path), loc->path, H5G_COPY_SHALLOW) < 0)
+ if(H5G_name_copy(&(dataset->path), loc->path, H5_COPY_SHALLOW) < 0)
HGOTO_ERROR (H5E_DATASET, H5E_CANTCOPY, NULL, "can't copy path")
/* Check if dataset was already open */
@@ -3103,6 +3103,8 @@ H5D_alloc_storage (H5F_t *f, hid_t dxpl_id, H5D_t *dset/*in,out*/, H5D_time_allo
assert(layout->u.compact.size>0);
if (NULL==(layout->u.compact.buf=H5MM_malloc(layout->u.compact.size)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate memory for compact dataset")
+ if(!full_overwrite)
+ HDmemset(layout->u.compact.buf, 0, layout->u.compact.size);
layout->u.compact.dirty = TRUE;
/* Indicate that we set the storage addr */