summaryrefslogtreecommitdiffstats
path: root/src/H5B.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-10-16 18:19:06 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-10-16 18:19:06 (GMT)
commitcdbb523b940f70c160402a32f236f7e8121aabf9 (patch)
tree2e14fc6e545d027bc4a2c612cb8f215bde93c32d /src/H5B.c
parent8f0acc169782d33d3519d321c4da3adbf93cd4d2 (diff)
downloadhdf5-cdbb523b940f70c160402a32f236f7e8121aabf9.zip
hdf5-cdbb523b940f70c160402a32f236f7e8121aabf9.tar.gz
hdf5-cdbb523b940f70c160402a32f236f7e8121aabf9.tar.bz2
[svn-r4548] Purpose:
Code cleanup. Description: Fix a few compiler warnings from the file creation property list -> generic property list conversion. Also change a hard-wired value (8) for the number of B-tree key values to a value that uses the enum's generated by the compiler. Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'src/H5B.c')
-rw-r--r--src/H5B.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/H5B.c b/src/H5B.c
index 9d82d42..dd8e388 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -284,21 +284,44 @@ H5B_create(H5F_t *f, const H5B_class_t *type, void *udata,
FUNC_LEAVE(ret_value);
}
-int H5B_Kvalue(H5F_t *f, const H5B_class_t *type)
+
+/*-------------------------------------------------------------------------
+ * Function: H5B_Kvalue
+ *
+ * Purpose: Replaced a macro to retrieve a B-tree key value for a certain
+ * type, now that the generic properties are being used to store
+ * the B-tree values.
+ *
+ * Return: Success: Non-negative, and the B-tree key value is
+ * returned.
+ *
+ * Failure: Negative (should not happen)
+ *
+ * Programmer: Raymond Lu
+ * slu@ncsa.uiuc.edu
+ * Oct 14 2001
+ *
+ * Modifications:
+ * Quincey Koziol, 2001-10-15
+ * Added this header and removed unused ret_value variable.
+ *-------------------------------------------------------------------------
+ */
+int
+H5B_Kvalue(H5F_t *f, const H5B_class_t *type)
{
- int ret_value = FAIL;
- int btree_k[8]={0};
+ int btree_k[H5B_NUM_BTREE_ID];
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");
FUNC_LEAVE(btree_k[type->id]);
-}
+} /* end H5B_Kvalue() */
/*-------------------------------------------------------------------------