summaryrefslogtreecommitdiffstats
path: root/src/H5I.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-07-31 15:27:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-07-31 15:27:07 (GMT)
commit17275779d07c094741039d0c263fdf055c32bfb6 (patch)
treeb8c90295b95498184125853f93fbb8717e2c5e8e /src/H5I.c
parent79b2b5a3213eb3dd950b5ad4d806f828e7fedb88 (diff)
downloadhdf5-17275779d07c094741039d0c263fdf055c32bfb6.zip
hdf5-17275779d07c094741039d0c263fdf055c32bfb6.tar.gz
hdf5-17275779d07c094741039d0c263fdf055c32bfb6.tar.bz2
[svn-r5839] Purpose:
Code cleanup Description: Move operations on each type of selection into the source code file for each selection type (all->H5Sall.c, hyperslab->H5Shyper.c, etc.) Remove central H5S_select_<foo> operations, instead calling the operations through function pointers in each selection (a much more object-oriented approach). Platforms tested: FreeBSD 4.6 (sleipnir)
Diffstat (limited to 'src/H5I.c')
-rw-r--r--src/H5I.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/H5I.c b/src/H5I.c
index 2bf2389..3e9ad18 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -641,12 +641,11 @@ H5I_object(hid_t id)
FUNC_ENTER_NOAPI(H5I_object, NULL);
/* General lookup of the ID */
- if (NULL==(id_ptr = H5I_find_id(id))) HGOTO_DONE(NULL);
+ if (NULL!=(id_ptr = H5I_find_id(id))) {
+ /* Get the object pointer to return */
+ ret_value = id_ptr->obj_ptr;
+ } /* end if */
- /* Check if we've found the correct ID */
- if (id_ptr) ret_value = id_ptr->obj_ptr;
-
- done:
FUNC_LEAVE(ret_value);
}
@@ -677,7 +676,9 @@ H5I_get_type(hid_t id)
FUNC_ENTER_NOAPI(H5I_get_type, H5I_BADID);
- if (id>0) ret_value = H5I_GROUP(id);
+ if (id>0)
+ ret_value = H5I_GROUP(id);
+
assert(ret_value>=H5I_BADID && ret_value<H5I_NGROUPS);
FUNC_LEAVE(ret_value);