summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBill Wendling <wendling@ncsa.uiuc.edu>2001-05-29 15:53:25 (GMT)
committerBill Wendling <wendling@ncsa.uiuc.edu>2001-05-29 15:53:25 (GMT)
commit1c61d72cf115da4212831b4efcbea0fe80d6f84f (patch)
tree195532312b66c1b526b2ea68dd9079c5b24c1fb4 /src
parent07b035e2d41e6f92186380a616815615e932f9de (diff)
downloadhdf5-1c61d72cf115da4212831b4efcbea0fe80d6f84f.zip
hdf5-1c61d72cf115da4212831b4efcbea0fe80d6f84f.tar.gz
hdf5-1c61d72cf115da4212831b4efcbea0fe80d6f84f.tar.bz2
[svn-r3946] Purpose:
Code Simplification Description: H5Pget_class() was being called from the H5.c module. Changed it so that it calls H5P_get_class() instead. Also, the H5Pget_class() and H5P_get_class() functions were identical. Changed so that H5Pget_class() calls H5P_get_class(). Platforms tested: Linux
Diffstat (limited to 'src')
-rw-r--r--src/H5.c2
-rw-r--r--src/H5P.c11
2 files changed, 2 insertions, 11 deletions
diff --git a/src/H5.c b/src/H5.c
index 8a89604..549c62e 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -1963,7 +1963,7 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...)
case H5I_TEMPLATE_5:
case H5I_TEMPLATE_6:
case H5I_TEMPLATE_7:
- switch (H5Pget_class(id_type)) {
+ switch (H5P_get_class(id_type)) {
case H5P_FILE_CREATE:
fprintf(out, "H5P_FILE_CREATE");
break;
diff --git a/src/H5P.c b/src/H5P.c
index 90db98d..1262b7f 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -533,21 +533,12 @@ H5P_close(void *_plist)
H5P_class_t
H5Pget_class(hid_t plist_id)
{
- H5I_type_t group;
H5P_class_t ret_value = H5P_NO_CLASS;
FUNC_ENTER(H5Pget_class, H5P_NO_CLASS);
H5TRACE1("p","i",plist_id);
- if ((group = H5I_get_type(plist_id)) < 0 ||
- group >= H5I_TEMPLATE_MAX ||
- group < H5I_TEMPLATE_0) {
- HRETURN_ERROR(H5E_ATOM, H5E_BADATOM, H5P_NO_CLASS,
- "not a property list");
- }
-
- ret_value = (H5P_class_t)(group - H5I_TEMPLATE_0);
-
+ ret_value = H5P_get_class(plist_id);
FUNC_LEAVE(ret_value);
}