summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.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/H5Dio.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/H5Dio.c')
-rw-r--r--src/H5Dio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 9fd24d3..3c36953 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -284,9 +284,10 @@ H5D_fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_t
/* Convert disk buffer into memory buffer */
if(!H5T_path_noop(tpath)) {
/* Allocate a background buffer */
- if(NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, (size_t)nelmts * buf_size)))
+ if(H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_conv, (size_t)nelmts * buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
+ /* Perform datatype conversion */
if(H5T_convert(tpath, src_id, dst_id, (size_t)nelmts, (size_t)0, (size_t)0, tmp_buf, bkg_buf, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed")
} /* end if */
@@ -298,7 +299,7 @@ H5D_fill(const void *fill, const H5T_t *fill_type, void *buf, const H5T_t *buf_t
if(!H5T_path_noop(tpath)) {
/* If there's no VL type of data, do conversion first then fill the data into
* the memory buffer. */
- if(NULL == (bkg_buf = H5FL_BLK_CALLOC(type_elem, buf_size)))
+ if(H5T_path_bkg(tpath) && NULL == (bkg_buf = H5FL_BLK_CALLOC(type_elem, buf_size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed")
/* Perform datatype conversion */