From 015d8047fb6841c7a2a9464fdf792dd82344c1ab Mon Sep 17 00:00:00 2001 From: Neil Fortner Date: Mon, 7 Dec 2015 14:31:47 -0500 Subject: [svn-r28533] Fix loops in H5Dvirtual.c to only loop over used entries in VDS mapping list, instead of all allocated entries. Tested: ummon (too minor for full h5committest) --- src/H5Dvirtual.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c index 4d81f19..7aceb2b 100644 --- a/src/H5Dvirtual.c +++ b/src/H5Dvirtual.c @@ -1325,7 +1325,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) new_dims[i] = HSIZE_UNDEF; /* Iterate over mappings */ - for(i = 0; i < storage->list_nalloc; i++) + for(i = 0; i < storage->list_nused; i++) /* Check for unlimited dimension */ if(storage->list[i].unlim_dim_virtual >= 0) { /* Check for "printf" source dataset resolution */ @@ -1567,7 +1567,7 @@ H5D__virtual_set_extent_unlim(const H5D_t *dset, hid_t dxpl_id) if(changed || (!storage->init && (storage->view == H5D_VDS_FIRST_MISSING))) { /* Iterate over mappings again to update source selections and virtual * mapping extents */ - for(i = 0; i < storage->list_nalloc; i++) { + for(i = 0; i < storage->list_nused; i++) { /* If there is an unlimited dimension, we are setting extent by the * minimum of mappings, and the virtual extent in the unlimited * dimension has changed since the last time the VDS extent/mapping @@ -1747,7 +1747,7 @@ H5D__virtual_init_all(const H5D_t *dset, hid_t dxpl_id) HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get VDS dimensions") /* Iterate over mappings */ - for(i = 0; i < storage->list_nalloc; i++) + for(i = 0; i < storage->list_nused; i++) /* Check for unlimited dimension */ if(storage->list[i].unlim_dim_virtual >= 0) { /* Check for "printf" source dataset resolution */ -- cgit v0.12