summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-01-11 21:17:44 +0900
committerGitHub <[email protected]>2021-01-11 21:17:44 +0900
commitd531636584e3bdcaa53ae34209613b9ef0c68730 (patch)
tree17fa60581232c95ee84c1dd04555428cbe229ed2 /src
parentf8b938435cbb5d9fe31bb2a544d2cac45b1471b3 (diff)
parent87ba84b048cb47227c9f4982f557e00ce73ec446 (diff)
downloadmruby-d531636584e3bdcaa53ae34209613b9ef0c68730.tar.gz
mruby-d531636584e3bdcaa53ae34209613b9ef0c68730.zip
Merge pull request #5283 from shuujii/add-missing-cast-in-ea_next_capa_for
Add missing cast in `ea_next_capa_for`
Diffstat (limited to 'src')
-rw-r--r--src/hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hash.c b/src/hash.c
index fe14865cf..8ca2f666e 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -365,7 +365,7 @@ ea_next_capa_for(uint32_t size, uint32_t max_capa)
* `EA_INCREASE_RATIO` is the current value, 32-bit range will not be
* exceeded during the calculation of `capa`, so `size_t` is used.
*/
- size_t capa = size * EA_INCREASE_RATIO, inc = capa - size;
+ size_t capa = (size_t)size * EA_INCREASE_RATIO, inc = capa - size;
if (EA_MAX_INCREASE < inc) capa = size + EA_MAX_INCREASE;
return capa <= max_capa ? U32(capa) : max_capa;
}