summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-08-15 22:51:15 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-08-15 22:51:15 (GMT)
commit538f743c145fbbfa7b1119693efd2ff61b34efae (patch)
tree67ca7eb8687bf008660d8a2fce0974805b0586f7
parent8d7ff1048b147d2bed8a1e6f21ea58d460f83402 (diff)
downloadhdf5-538f743c145fbbfa7b1119693efd2ff61b34efae.zip
hdf5-538f743c145fbbfa7b1119693efd2ff61b34efae.tar.gz
hdf5-538f743c145fbbfa7b1119693efd2ff61b34efae.tar.bz2
Changes based on PR feedback.
-rw-r--r--release_docs/RELEASE.txt4
-rw-r--r--src/H5Fint.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 2cc880a..b940095 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -338,8 +338,8 @@ Bug Fixes since HDF5-1.10.3 release
to unsigned later on, the decimal part is chopped off causing the test
failure.
- This was fixed by performing ((value of log10) + 1) first before casting
- the result to unsigned.
+ This was fixed by obtaining the rounded integer value (HDceil) for the
+ log10 value of read attempts first before casting the result to unsigned.
(VC - 2019/8/14, HDFFV-10813)
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 6aec40c..29f017e 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -2992,8 +2992,10 @@ H5F_set_retries(H5F_t *f)
/* Initialize the # of bins for retries */
f->shared->retries_nbins = 0;
if(f->shared->read_attempts > 1) {
- tmp = HDlog10((double)(f->shared->read_attempts - 1));
- f->shared->retries_nbins = (unsigned)(tmp + 1);
+ /* Use HDceil to ensure that the log10 value is rounded up to the
+ nearest integer before casting to unsigned */
+ tmp = HDceil(HDlog10((double)f->shared->read_attempts));
+ f->shared->retries_nbins = (unsigned)tmp;
}
FUNC_LEAVE_NOAPI(SUCCEED)