diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-03-12 21:54:00 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-03-12 21:54:00 (GMT) |
commit | 37156e3914aafa6b9fd75498ce588d7b87e143cf (patch) | |
tree | ec41dc1f5d8659ca4e0e05bb9a3e71364188678e /src/H5Dcontig.c | |
parent | cad1e02a77240c7b730569a6f3552dc6d752fa30 (diff) | |
download | hdf5-37156e3914aafa6b9fd75498ce588d7b87e143cf.zip hdf5-37156e3914aafa6b9fd75498ce588d7b87e143cf.tar.gz hdf5-37156e3914aafa6b9fd75498ce588d7b87e143cf.tar.bz2 |
[svn-r22055] Description:
Bring r22053 from trunk to 1.8 branch:
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.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index cafa4a4..f894739 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() */ |