diff options
author | David Young <dyoung@hdfgroup.org> | 2020-08-31 22:21:58 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-08-31 22:21:58 (GMT) |
commit | f45bb2197958238c109c953315202d67af5238ef (patch) | |
tree | e84f98cc6cc3f73980bc21ab2fa30e2dabc788d3 /src | |
parent | 599be55d973fac130b43be54395bc8bab1e21cd8 (diff) | |
download | hdf5-f45bb2197958238c109c953315202d67af5238ef.zip hdf5-f45bb2197958238c109c953315202d67af5238ef.tar.gz hdf5-f45bb2197958238c109c953315202d67af5238ef.tar.bz2 |
Write a comment about a bit of overflow-avoidance logic. NFCI.
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Fvfd_swmr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c index 376fa38..dbe04ec 100644 --- a/src/H5Fvfd_swmr.c +++ b/src/H5Fvfd_swmr.c @@ -1956,6 +1956,7 @@ vfd_swmr_enlarge_shadow_index(H5F_t *f) old_mdf_idx = shared->mdf_idx; old_mdf_idx_len = shared->mdf_idx_len; + /* New length is double previous or UINT32_MAX, whichever is smaller. */ if (UINT32_MAX - old_mdf_idx_len >= old_mdf_idx_len) new_mdf_idx_len = old_mdf_idx_len * 2; else |