summaryrefslogtreecommitdiffstats
path: root/src/H5B.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-11-20 19:07:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-11-20 19:07:22 (GMT)
commit6ab0e9f0929738cdb3ba87fd409c68ad3db4178c (patch)
tree8142391516c53e90569f4e8ff4dcde376fcf16f9 /src/H5B.c
parent2e53165b47744ad71645492f74d4332371cc5179 (diff)
downloadhdf5-6ab0e9f0929738cdb3ba87fd409c68ad3db4178c.zip
hdf5-6ab0e9f0929738cdb3ba87fd409c68ad3db4178c.tar.gz
hdf5-6ab0e9f0929738cdb3ba87fd409c68ad3db4178c.tar.bz2
[svn-r4620] Purpose:
Code cleanup Description: Get rid of IDs from internal function calls and some small cleanups from the old-stype => generic property list conversion. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'src/H5B.c')
-rw-r--r--src/H5B.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/H5B.c b/src/H5B.c
index 5a6d2f3..7ff8f73 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -96,6 +96,7 @@
#include "H5Eprivate.h" /*error handling */
#include "H5Fpkg.h" /*file access */
#include "H5FLprivate.h" /*Free Lists */
+#include "H5Iprivate.h" /*IDs */
#include "H5MFprivate.h" /*file memory management */
#include "H5MMprivate.h" /*core memory management */
#include "H5Pprivate.h" /*property lists */
@@ -310,15 +311,19 @@ int
H5B_Kvalue(H5F_t *f, const H5B_class_t *type)
{
int btree_k[H5B_NUM_BTREE_ID];
+ H5P_genplist_t *plist;
FUNC_ENTER(H5B_Kvalue, FAIL);
assert(f);
assert(type);
- if(H5P_get(f->shared->fcpl_id, H5F_CRT_BTREE_RANK_NAME, btree_k) < 0)
- HRETURN_ERROR(H5E_PLIST, H5E_CANTGET, FAIL,
- "unable to get rank for btree internal nodes");
+ /* Check arguments */
+ if (NULL == (plist = H5I_object(f->shared->fcpl_id)))
+ HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list");
+
+ if(H5P_get(plist, H5F_CRT_BTREE_RANK_NAME, btree_k) < 0)
+ HRETURN_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get rank for btree internal nodes");
FUNC_LEAVE(btree_k[type->id]);
} /* end H5B_Kvalue() */