summaryrefslogtreecommitdiffstats
path: root/src/H5Dio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-09-23 03:05:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-09-23 03:05:15 (GMT)
commit9fc48a009786e78c1acf3ed7a5c74e1ef73e8b94 (patch)
treef357807db04a3f9fca8f4a207ab91b6392a24b8f /src/H5Dio.c
parentf235187dba7dfbef6a158340e1235c494303a9ad (diff)
downloadhdf5-9fc48a009786e78c1acf3ed7a5c74e1ef73e8b94.zip
hdf5-9fc48a009786e78c1acf3ed7a5c74e1ef73e8b94.tar.gz
hdf5-9fc48a009786e78c1acf3ed7a5c74e1ef73e8b94.tar.bz2
[svn-r9312] Purpose:
Bug fix. Description: Allow I/O to occur on 0 element selections. Platforms tested: h5committest
Diffstat (limited to 'src/H5Dio.c')
-rw-r--r--src/H5Dio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Dio.c b/src/H5Dio.c
index b7d9580..6c76b09 100644
--- a/src/H5Dio.c
+++ b/src/H5Dio.c
@@ -1134,9 +1134,8 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset,
/* Sanity check dataset, then read it */
assert(((dataset->layout.type==H5D_CONTIGUOUS && H5F_addr_defined(dataset->layout.u.contig.addr))
|| (dataset->layout.type==H5D_CHUNKED && H5F_addr_defined(dataset->layout.u.chunk.addr)))
- || dataset->efl.nused>0 ||
- H5S_NULL == H5S_GET_EXTENT_TYPE(file_space) ||
- dataset->layout.type==H5D_COMPACT);
+ || dataset->efl.nused>0 || 0 == nelmts
+ || dataset->layout.type==H5D_COMPACT);
H5_CHECK_OVERFLOW(nelmts,hsize_t,size_t);
status = (sconv->read)(dataset->ent.file, dxpl_cache, dxpl_id,
dataset, (H5D_storage_t *)&(dataset->efl),
@@ -1243,8 +1242,8 @@ H5D_contig_read(hsize_t nelmts, H5D_t *dataset,
/* Sanity check that space is allocated, then read data from it */
assert(((dataset->layout.type==H5D_CONTIGUOUS && H5F_addr_defined(dataset->layout.u.contig.addr))
|| (dataset->layout.type==H5D_CHUNKED && H5F_addr_defined(dataset->layout.u.chunk.addr)))
- || dataset->efl.nused>0 ||
- dataset->layout.type==H5D_COMPACT);
+ || dataset->efl.nused>0 || 0 == nelmts
+ || dataset->layout.type==H5D_COMPACT);
n = H5S_select_fgath(dataset->ent.file, dxpl_cache, dxpl_id,
dataset, (H5D_storage_t *)&(dataset->efl),
file_space, &file_iter, smine_nelmts,
@@ -1639,7 +1638,8 @@ H5D_chunk_read(hsize_t nelmts, H5D_t *dataset,
/* Sanity check dataset, then read it */
assert(((dataset->layout.type==H5D_CONTIGUOUS && H5F_addr_defined(dataset->layout.u.contig.addr))
|| (dataset->layout.type==H5D_CHUNKED && H5F_addr_defined(dataset->layout.u.chunk.addr)))
- || dataset->efl.nused>0 || dataset->layout.type==H5D_COMPACT);
+ || dataset->efl.nused>0 || 0 == nelmts
+ || dataset->layout.type==H5D_COMPACT);
/* Get first node in chunk tree */
chunk_node=H5TB_first(fm.fsel->root);