Unverified Commit d5316365 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #5283 from shuujii/add-missing-cast-in-ea_next_capa_for

Add missing cast in `ea_next_capa_for`
parents f8b93843 87ba84b0
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment