summaryrefslogtreecommitdiffstats
path: root/src/H5B2hdr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-11-05 13:45:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-11-05 13:45:35 (GMT)
commit30a52dd1a26f507f240cf48a9342e5a1d6023983 (patch)
treecb52db492fdd7ec0e612c44ba544207f853f4356 /src/H5B2hdr.c
parent57932312606b1f4678b243c5bb6887cd878e0bf5 (diff)
downloadhdf5-30a52dd1a26f507f240cf48a9342e5a1d6023983.zip
hdf5-30a52dd1a26f507f240cf48a9342e5a1d6023983.tar.gz
hdf5-30a52dd1a26f507f240cf48a9342e5a1d6023983.tar.bz2
[svn-r17838] Description:
Further refactoring of v2 B-tree code, moving toward being able to pass a context information to a client's encode/decode callbacks. Also, clean up of other minor compiler warnings and code formatting issues. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.1 (amazon) in debug mode Mac OS X/32 10.6.1 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5B2hdr.c')
-rw-r--r--src/H5B2hdr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index 95bafdd..31e1674 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -188,7 +188,7 @@ HDmemset(hdr->page, 0, hdr->node_size);
/* Initialize internal node info */
if(depth > 0) {
for(u = 1; u < (depth + 1); u++) {
- sz_max_nrec = H5B2_NUM_INT_REC(f, hdr, u);
+ sz_max_nrec = H5B2_NUM_INT_REC(hdr, u);
H5_ASSIGN_OVERFLOW(/* To: */ hdr->node_info[u].max_nrec, /* From: */ sz_max_nrec, /* From: */ size_t, /* To: */ unsigned)
HDassert(hdr->node_info[u].max_nrec <= hdr->node_info[u - 1].max_nrec);
@@ -248,6 +248,8 @@ H5B2_hdr_alloc(H5F_t *f)
/* Assign non-zero information */
hdr->f = f;
+ hdr->sizeof_addr = H5F_SIZEOF_ADDR(f);
+ hdr->sizeof_size = H5F_SIZEOF_SIZE(f);
hdr->root.addr = HADDR_UNDEF;
/* Set return value */
@@ -579,7 +581,7 @@ H5B2_hdr_delete(H5B2_hdr_t *hdr, hid_t dxpl_id)
/* Delete all nodes in B-tree */
if(H5F_addr_defined(hdr->root.addr))
- if(H5B2_delete_node(hdr->f, dxpl_id, hdr, hdr->depth, &hdr->root, hdr->remove_op, hdr->remove_op_data) < 0)
+ if(H5B2_delete_node(hdr, dxpl_id, hdr->depth, &hdr->root, hdr->remove_op, hdr->remove_op_data) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_CANTDELETE, FAIL, "unable to delete B-tree nodes")
/* Indicate that the heap header should be deleted & file space freed */