summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-07-20 17:11:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-07-20 17:11:36 (GMT)
commit00909f278d64017c21c8348537231daba97be9dd (patch)
treebf17a4086979f776a008aa4606fea1b3e7a5edb8 /src/H5Dio.c
parent129f72fb3ed868fab0fa1cd71854aa1aad366336 (diff)
downloadhdf5-00909f278d64017c21c8348537231daba97be9dd.zip
hdf5-00909f278d64017c21c8348537231daba97be9dd.tar.gz
hdf5-00909f278d64017c21c8348537231daba97be9dd.tar.bz2
[svn-r8901] Purpose:
Bug fix Description: Allow buffer parameter to H5Dread & H5Dwrite to be NULL if there are no elements to transfer. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r--src/H5Dio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index 0d9a91c..fb07831 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -480,7 +480,7 @@ H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
else
if (TRUE!=H5P_isa_class(plist_id,H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
- if (!buf)
+ if (!buf && H5S_GET_SELECT_NPOINTS(file_space)!=0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer")
/* read raw data */
@@ -568,7 +568,7 @@ H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id,
else
if (TRUE!=H5P_isa_class(plist_id,H5P_DATASET_XFER))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not xfer parms")
- if (!buf)
+ if (!buf && H5S_GET_SELECT_NPOINTS(file_space)!=0)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no output buffer")
/* write raw data */
@@ -649,7 +649,6 @@ H5D_read(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* check args */
assert(dataset && dataset->ent.file);
- assert(buf);
/* Get memory datatype */
if (NULL == (mem_type = H5I_object_verify(mem_type_id, H5I_DATATYPE)))
@@ -846,7 +845,6 @@ H5D_write(H5D_t *dataset, hid_t mem_type_id, const H5S_t *mem_space,
/* check args */
assert(dataset && dataset->ent.file);
- assert(buf);
/* Get the memory datatype */
if (NULL == (mem_type = H5I_object_verify(mem_type_id, H5I_DATATYPE)))