summaryrefslogtreecommitdiffstats
path: root/src/H5Dvirtual.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-08-19 16:21:27 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-08-19 16:21:27 (GMT)
commit6909d2033f0d7d87c9fc03dfc778ea3e9437032a (patch)
treeeb5fdf5bb781fa955f2acfbc69d724c2647206dd /src/H5Dvirtual.c
parent69e2f53edbfba4bee9865cec3df78c0cbab42182 (diff)
downloadhdf5-6909d2033f0d7d87c9fc03dfc778ea3e9437032a.zip
hdf5-6909d2033f0d7d87c9fc03dfc778ea3e9437032a.tar.gz
hdf5-6909d2033f0d7d87c9fc03dfc778ea3e9437032a.tar.bz2
[svn-r27527] Add tests to hit code coverage assertions in H5Olayout.c.
Fix issue in VDS delete routine. Tested: ummon
Diffstat (limited to 'src/H5Dvirtual.c')
-rw-r--r--src/H5Dvirtual.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 638ad6d..9a25494 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -519,7 +519,6 @@ H5D__virtual_copy_layout(H5O_layout_t *layout)
} /* end for */
} /* end if */
else {
- HDassert(0 && "checking code coverage..."); //VDSINC
/* Zero out other fields related to list, just to be sure */
layout->storage.u.virt.list = NULL;
layout->storage.u.virt.list_nalloc = 0;
@@ -704,15 +703,18 @@ H5D__virtual_delete(H5F_t *f, hid_t dxpl_id, H5O_storage_t *storage)
HDassert(storage);
HDassert(storage->type == H5D_VIRTUAL);
+ /* Check for global heap block */
+ if(storage->u.virt.serial_list_hobjid.addr != HADDR_UNDEF) {
#ifdef NOT_YET
- /* Unlink the global heap block */
- if((heap_rc = H5HG_link(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid), -1)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap refence count")
- if(heap_rc == 0)
+ /* Unlink the global heap block */
+ if((heap_rc = H5HG_link(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid), -1)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTMODIFY, FAIL, "unable to adjust global heap refence count")
+ if(heap_rc == 0)
#endif /* NOT_YET */
- /* Delete the global heap block */
- if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to remove heap object")
+ /* Delete the global heap block */
+ if(H5HG_remove(f, dxpl_id, (H5HG_t *)&(storage->u.virt.serial_list_hobjid)) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTREMOVE, FAIL, "unable to remove heap object")
+ } /* end if */
/* Clear global heap ID in storage */
storage->u.virt.serial_list_hobjid.addr = HADDR_UNDEF;