diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-10-16 18:19:06 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-10-16 18:19:06 (GMT) |
commit | cdbb523b940f70c160402a32f236f7e8121aabf9 (patch) | |
tree | 2e14fc6e545d027bc4a2c612cb8f215bde93c32d /src/H5B.c | |
parent | 8f0acc169782d33d3519d321c4da3adbf93cd4d2 (diff) | |
download | hdf5-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.c | 31 |
1 files changed, 27 insertions, 4 deletions
@@ -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() */ /*------------------------------------------------------------------------- |