summaryrefslogtreecommitdiffstats
path: root/src/H5FScache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-03-13 22:12:13 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-03-13 22:12:13 (GMT)
commitafd5021ef9dafc99fda0e47774152f4dc2e57a6f (patch)
tree8f1aec9a3037862e13a8325c5e9db3fb999bb38e /src/H5FScache.c
parent6763f7c8824fb415493cfdb88155449c4d22d16f (diff)
downloadhdf5-afd5021ef9dafc99fda0e47774152f4dc2e57a6f.zip
hdf5-afd5021ef9dafc99fda0e47774152f4dc2e57a6f.tar.gz
hdf5-afd5021ef9dafc99fda0e47774152f4dc2e57a6f.tar.bz2
[svn-r14738] Description:
Bring r14737 back from the 1.8 branch: Fix bug which would incorrectly encode the member offsets for compound datatypes whose size was between 256 & 511 bytes, when the "use the latest format" feature was enabled. Tested on: Mac OS X/32 10.5.2 (amazon) w/debug FreeBSD/32 6.2 (duty) w/production
Diffstat (limited to 'src/H5FScache.c')
-rw-r--r--src/H5FScache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5FScache.c b/src/H5FScache.c
index 74a9aab..8ad9631 100644
--- a/src/H5FScache.c
+++ b/src/H5FScache.c
@@ -606,7 +606,7 @@ HDfprintf(stderr, "%s: fspace->addr = %a, fs_addr = %a\n", FUNC, fspace->addr, f
unsigned sect_cnt_size; /* The size of the section size counts */
/* Compute the size of the section counts */
- sect_cnt_size = MAX(1, (H5V_log2_gen(fspace->serial_sect_count) + 7) / 8);
+ sect_cnt_size = H5V_limit_enc_size((uint64_t)fspace->serial_sect_count);
#ifdef QAK
HDfprintf(stderr, "%s: sect_cnt_size = %u\n", FUNC, sect_cnt_size);
HDfprintf(stderr, "%s: fspace->sect_len_size = %u\n", FUNC, fspace->sect_len_size);
@@ -905,7 +905,7 @@ HDfprintf(stderr, "%s: sinfo->fspace->addr = %a\n", FUNC, sinfo->fspace->addr);
/* Set up user data for iterator */
udata.sinfo = sinfo;
udata.p = &p;
- udata.sect_cnt_size = MAX(1, (H5V_log2_gen(sinfo->fspace->serial_sect_count) + 7) / 8);
+ udata.sect_cnt_size = H5V_limit_enc_size((uint64_t)sinfo->fspace->serial_sect_count);
#ifdef QAK
HDfprintf(stderr, "%s: udata.sect_cnt_size = %u\n", FUNC, udata.sect_cnt_size);
#endif /* QAK */