summaryrefslogtreecommitdiffstats
path: root/src/H5Oattribute.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-08 15:47:56 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-08 15:47:56 (GMT)
commita4527a631c6713b491aff80a4604dc21500540c4 (patch)
treea47a949cd53a902cf11dffbccdd34c9e2e371820 /src/H5Oattribute.c
parent77a2e54459cee60effc94513bdb047dbf2ef847b (diff)
downloadhdf5-a4527a631c6713b491aff80a4604dc21500540c4.zip
hdf5-a4527a631c6713b491aff80a4604dc21500540c4.tar.gz
hdf5-a4527a631c6713b491aff80a4604dc21500540c4.tar.bz2
[svn-r13120] Description:
Add support for deleting deleting dense storage when no compact storage will be used. Change shared message's "get heap address" routine to return address in parameter instead of return value, to allow better error detection. Start writing tests for shared attributes which use shared components (datatypes or dataspaces) Tested on: Mac OS X/32 10.4.8 (amazon) FreeBSD/32 6.1 (duty)
Diffstat (limited to 'src/H5Oattribute.c')
-rw-r--r--src/H5Oattribute.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 287f5c6..b1e8d31 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -1241,10 +1241,9 @@ H5O_attr_remove(const H5O_loc_t *loc, const char *name, hid_t dxpl_id)
} /* end else */
/* Check for shifting from dense storage back to compact storage */
- if(H5F_addr_defined(oh->attr_fheap_addr) && oh->nattrs < oh->min_dense) {
+ if(H5F_addr_defined(oh->attr_fheap_addr) && (oh->nattrs == 0 || oh->nattrs < oh->min_dense)) {
/* Check if there's no more attributes */
if(oh->nattrs == 0) {
-/* XXX: Test this */
/* Delete the dense storage */
if(H5A_dense_delete(loc->file, dxpl_id, oh) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTDELETE, FAIL, "unable to delete dense attribute storage")