diff options
Diffstat (limited to 'src/H5F.c')
-rw-r--r-- | src/H5F.c | 22 |
1 files changed, 7 insertions, 15 deletions
@@ -109,7 +109,6 @@ H5FL_DEFINE(H5F_file_t); static const H5I_class_t H5I_FILE_CLS[1] = {{ H5I_FILE, /* ID class value */ 0, /* Class flags */ - 64, /* Minimum hash size for class */ 0, /* # of reserved IDs for class */ (H5I_free_t)H5F_close /* Callback routine for closing objects of this class */ }}; @@ -667,6 +666,13 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) HDassert(obj_ptr); HDassert(olist); + /* Check if we've filled up the array. Return TRUE only if + * we have filled up the array. Otherwise return FALSE(RET_VALUE is + * preset to FALSE) because H5I_iterate needs the return value of + * FALSE to continue the iteration. */ + if(olist->max_index>0 && olist->list_index>=olist->max_index) + HGOTO_DONE(TRUE) /* Indicate that the iterator should stop */ + /* Count file IDs */ if(olist->obj_type == H5I_FILE) { if((olist->file_info.local && @@ -682,13 +688,6 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) /* Increment the number of open objects */ if(olist->obj_id_count) (*olist->obj_id_count)++; - - /* Check if we've filled up the array. Return TRUE only if - * we have filled up the array. Otherwise return FALSE(RET_VALUE is - * preset to FALSE) because H5I_iterate needs the return value of - * FALSE to continue the iteration. */ - if(olist->max_index>0 && olist->list_index>=olist->max_index) - HGOTO_DONE(TRUE) /* Indicate that the iterator should stop */ } } /* end if */ else { /* either count opened object IDs or put the IDs on the list */ @@ -747,13 +746,6 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) /* Increment the number of open objects */ if(olist->obj_id_count) (*olist->obj_id_count)++; - - /* Check if we've filled up the array. Return TRUE only if - * we have filled up the array. Otherwise return FALSE(RET_VALUE is - * preset to FALSE) because H5I_iterate needs the return value of - * FALSE to continue iterating. */ - if(olist->max_index>0 && olist->list_index>=olist->max_index) - HGOTO_DONE(TRUE) /* Indicate that the iterator should stop */ } /* end if */ } /* end else */ |