diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-10-16 18:04:11 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-10-16 18:04:11 (GMT) |
commit | 366f0151ddf63b0a08c4cef7f295d78d9ecd117d (patch) | |
tree | 2bcff4c4f4e8c4caa5dbd890ab441682a75f62bd /src/H5Fint.c | |
parent | adb2fd1cc0858602046959689377dbdb60a4c3a6 (diff) | |
parent | 370e6f3f56bafa13c19eaa292a16929a8b918120 (diff) | |
download | hdf5-366f0151ddf63b0a08c4cef7f295d78d9ecd117d.zip hdf5-366f0151ddf63b0a08c4cef7f295d78d9ecd117d.tar.gz hdf5-366f0151ddf63b0a08c4cef7f295d78d9ecd117d.tar.bz2 |
[svn-r24301] merge from trunk.
resolve conflicts, etc...
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r-- | src/H5Fint.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c index 21692e5..1a5514f 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -465,12 +465,19 @@ 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 && - (!olist->file_info.ptr.file || (olist->file_info.ptr.file && (H5F_t*)obj_ptr == olist->file_info.ptr.file) )) - || (!olist->file_info.local && - ( !olist->file_info.ptr.shared || (olist->file_info.ptr.shared && ((H5F_t*)obj_ptr)->shared == olist->file_info.ptr.shared) ))) { + (!olist->file_info.ptr.file || (olist->file_info.ptr.file && (H5F_t*)obj_ptr == olist->file_info.ptr.file) )) + || (!olist->file_info.local && + ( !olist->file_info.ptr.shared || (olist->file_info.ptr.shared && ((H5F_t*)obj_ptr)->shared == olist->file_info.ptr.shared) ))) { /* Add the object's ID to the ID list, if appropriate */ if(olist->obj_id_list) { olist->obj_id_list[olist->list_index] = obj_id; @@ -480,13 +487,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 */ @@ -507,7 +507,8 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) case H5I_DATATYPE: { - H5T_t *type; + H5T_t *type = NULL; + /* Get the actual datatype object that should be the vol_obj */ if(NULL == (type = (H5T_t *)H5T_get_named_type((H5T_t*)obj_ptr))) oloc = NULL; @@ -515,13 +516,13 @@ H5F_get_objects_cb(void *obj_ptr, hid_t obj_id, void *key) oloc = H5T_oloc(type); break; } + case H5I_UNINIT: case H5I_BADID: case H5I_FILE: case H5I_DATASPACE: case H5I_REFERENCE: case H5I_VFL: - case H5I_VOL: case H5I_GENPROP_CLS: case H5I_GENPROP_LST: case H5I_ERROR_CLASS: @@ -549,13 +550,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 */ |