diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-08-23 15:26:25 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-08-23 15:26:25 (GMT) |
commit | 9c30e7bba121b63c62b2d76c1c0353a5145bdd73 (patch) | |
tree | 7dcc5f620076d83997058f311e0dd019339b9609 /src/H5B2cache.c | |
parent | 2c7ce93f85905bb31e594f55ab2cd0c125fb36be (diff) | |
download | hdf5-9c30e7bba121b63c62b2d76c1c0353a5145bdd73.zip hdf5-9c30e7bba121b63c62b2d76c1c0353a5145bdd73.tar.gz hdf5-9c30e7bba121b63c62b2d76c1c0353a5145bdd73.tar.bz2 |
[svn-r12619] Description:
Fix off-by-one error in computing the size of metadata prefixes for v2
B-tree internal & leaf nodes.
General code cleanup and reformating.
Tested On:
Mac OS X.4/PPC (amazon)
Too minor to require h5committest
Diffstat (limited to 'src/H5B2cache.c')
-rw-r--r-- | src/H5B2cache.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c index ee359aa..e23791d 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -142,7 +142,7 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, vo { const H5B2_class_t *type = (const H5B2_class_t *) _type; /* Type of B-tree */ size_t node_size, rrec_size; /* Size info for B-tree */ - unsigned split_percent, merge_percent; /* Split & merge info for B-tree */ + uint8_t split_percent, merge_percent; /* Split & merge %s for B-tree */ H5B2_t *bt2 = NULL; /* B-tree info */ size_t size; /* Header size */ uint32_t stored_chksum; /* Stored metadata checksum value */ @@ -199,8 +199,8 @@ H5B2_cache_hdr_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void *_type, vo UINT16DECODE(p, bt2->depth); /* Split & merge %s */ - UINT16DECODE(p, split_percent); - UINT16DECODE(p, merge_percent); + split_percent = *p++; + merge_percent = *p++; /* Root node pointer */ H5F_addr_decode(f, (const uint8_t **)&p, &(bt2->root.addr)); @@ -302,8 +302,8 @@ H5B2_cache_hdr_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5B UINT16ENCODE(p, bt2->depth); /* Split & merge %s */ - UINT16ENCODE(p, shared->split_percent); - UINT16ENCODE(p, shared->merge_percent); + *p++ = shared->split_percent; + *p++ = shared->merge_percent; /* Root node pointer */ H5F_addr_encode(f, &p, bt2->root.addr); |