summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-06-08 03:06:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-06-08 03:06:56 (GMT)
commit15dbc76104b87ff2aa748e73633cfe87270e3807 (patch)
treec38415945dcd3c5d76585435347d365d4f38f3a1 /src/H5D.c
parentccea4bb7b5644666d0cb70b4d5c35a12fc133d59 (diff)
downloadhdf5-15dbc76104b87ff2aa748e73633cfe87270e3807.zip
hdf5-15dbc76104b87ff2aa748e73633cfe87270e3807.tar.gz
hdf5-15dbc76104b87ff2aa748e73633cfe87270e3807.tar.bz2
[svn-r13842] Description:
Fix compact dataset storage to initialize VL datatype fill values correctly. Also, fix bug in global heap code when the fix action on a global heap is to delete an object in a heap with no free space. Tested on: Mac OS X/32 10.4.9 (amazon) FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/H5D.c b/src/H5D.c
index dbd2315..8aa5996 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -2497,21 +2497,9 @@ H5D_init_storage(H5D_t *dset, hbool_t full_overwrite, hid_t dxpl_id)
case H5D_COMPACT:
/* If we will be immediately overwriting the values, don't bother to clear them */
if(!full_overwrite) {
- /* If the fill value is defined, initialize the data buffer with it */
- if(dset->shared->dcpl_cache.fill.buf) {
- hssize_t snpoints; /* Number of points in space (for error checking) */
- size_t npoints; /* Number of points in space */
-
- /* Get the number of elements in the dataset's dataspace */
- snpoints = H5S_GET_EXTENT_NPOINTS(dset->shared->space);
- HDassert(snpoints >= 0);
- H5_ASSIGN_OVERFLOW(npoints, snpoints, hssize_t, size_t);
-
- /* Initialize the cached data buffer with the fill value */
- H5V_array_fill(dset->shared->layout.u.compact.buf, dset->shared->dcpl_cache.fill.buf, (size_t)dset->shared->dcpl_cache.fill.size, npoints);
- } /* end if */
- else /* If the fill value is default, zero set data buf. */
- HDmemset(dset->shared->layout.u.compact.buf, 0, dset->shared->layout.u.compact.size);
+ /* Fill the compact dataset storage */
+ if(H5D_compact_fill(dset, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to initialize compact dataset storage")
} /* end if */
break;