summaryrefslogtreecommitdiffstats
path: root/src/H5Dcontig.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-03-12 21:45:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-03-12 21:45:38 (GMT)
commitf698c360f567e9094050b699dfa4721dc1852a68 (patch)
tree1c6f6f027fa8f27bdedffb4e8a2e64fdc33b6c78 /src/H5Dcontig.c
parentfcf96afeb24119690187ac3907d23070f0ba99d1 (diff)
downloadhdf5-f698c360f567e9094050b699dfa4721dc1852a68.zip
hdf5-f698c360f567e9094050b699dfa4721dc1852a68.tar.gz
hdf5-f698c360f567e9094050b699dfa4721dc1852a68.tar.bz2
[svn-r22053] Description:
Correct corner case for creating a contiguous dataset with a zero-sized dataspace, when the allocation time is set to early. Also clean up a few compiler warnings in the dataspace code. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug & parallel
Diffstat (limited to 'src/H5Dcontig.c')
-rw-r--r--src/H5Dcontig.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index 674582d..bb10b77 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -494,8 +494,11 @@ H5D_contig_is_space_alloc(const H5O_storage_t *storage)
/* Sanity checks */
HDassert(storage);
- /* Set return value */
- ret_value = (hbool_t)H5F_addr_defined(storage->u.contig.addr);
+ /* Set return value, indicating space is allocated when size is zero */
+ if(0 == storage->u.contig.size)
+ ret_value = TRUE;
+ else
+ ret_value = (hbool_t)H5F_addr_defined(storage->u.contig.addr);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D_contig_is_space_alloc() */