diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2000-04-14 19:07:32 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2000-04-14 19:07:32 (GMT) |
commit | bb12f5d5d2e76bad01222f214a8e492e6f13e07b (patch) | |
tree | c49420fb1d15712fd6c0e1005968692e20e72e9a /src/H5B.c | |
parent | 0a77488511419bb82b7901bd63d8fdc2a0a4ec9b (diff) | |
download | hdf5-bb12f5d5d2e76bad01222f214a8e492e6f13e07b.zip hdf5-bb12f5d5d2e76bad01222f214a8e492e6f13e07b.tar.gz hdf5-bb12f5d5d2e76bad01222f214a8e492e6f13e07b.tar.bz2 |
[svn-r2147] Corrected a few problems in the free-list code and added more assert() macros
to double-check things. I've turned them back on again now. I also changed
the internal representation of a few struct fields to be float instead of
double, since the HP/UX 10.20 compiler was having problems with the alignment
of the doubles.
Diffstat (limited to 'src/H5B.c')
-rw-r--r-- | src/H5B.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -106,7 +106,7 @@ /* PRIVATE PROTOTYPES */ static H5B_ins_t H5B_insert_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, - const double split_ratios[], + const float split_ratios[], uint8_t *lt_key, hbool_t *lt_key_changed, uint8_t *md_key, void *udata, @@ -124,7 +124,7 @@ static size_t H5B_nodesize(H5F_t *f, const H5B_class_t *type, size_t *total_nkey_size, size_t sizeof_rkey); static herr_t H5B_split(H5F_t *f, const H5B_class_t *type, H5B_t *old_bt, haddr_t old_addr, intn idx, - const double split_ratios[], void *udata, + const float split_ratios[], void *udata, haddr_t *new_addr/*out*/); #ifdef H5B_DEBUG static herr_t H5B_assert(H5F_t *f, haddr_t addr, const H5B_class_t *type, @@ -628,7 +628,7 @@ H5B_find(H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) */ static herr_t H5B_split(H5F_t *f, const H5B_class_t *type, H5B_t *old_bt, haddr_t old_addr, - intn idx, const double split_ratios[], void *udata, + intn idx, const float split_ratios[], void *udata, haddr_t *new_addr_p/*out*/) { H5B_t *new_bt = NULL, *tmp_bt = NULL; @@ -865,7 +865,7 @@ H5B_decode_keys(H5F_t *f, H5B_t *bt, intn idx) */ herr_t H5B_insert(H5F_t *f, const H5B_class_t *type, haddr_t addr, - const double split_ratios[], void *udata) + const float split_ratios[], void *udata) { /* * These are defined this way to satisfy alignment constraints. @@ -1160,7 +1160,7 @@ H5B_insert_child(H5F_t *f, const H5B_class_t *type, H5B_t *bt, */ static H5B_ins_t H5B_insert_helper(H5F_t *f, haddr_t addr, const H5B_class_t *type, - const double split_ratios[], uint8_t *lt_key, + const float split_ratios[], uint8_t *lt_key, hbool_t *lt_key_changed, uint8_t *md_key, void *udata, uint8_t *rt_key, hbool_t *rt_key_changed, haddr_t *new_node_p/*out*/) @@ -1604,8 +1604,10 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, haddr_t addr, void *udata) } done: - H5FL_ARR_FREE(haddr_t,child); - H5MM_xfree(key); + if(child!=NULL) + H5FL_ARR_FREE(haddr_t,child); + if(key!=NULL) + H5MM_xfree(key); FUNC_LEAVE(ret_value); } |