Use division expression instead of some floating point literals
MODIFY
src/gc.c
src/gc.c
@@ -412,7 +412,7 @@ gc_protect(mrb_state *mrb, mrb_gc *gc, struct RBasic *p)
#else
if (gc->arena_idx >= gc->arena_capa) {
/* extend arena */
- gc->arena_capa = (int)(gc->arena_capa * 1.5);
+ gc->arena_capa = (int)(gc->arena_capa * 3 / 2);
gc->arena = (struct RBasic**)mrb_realloc(mrb, gc->arena, sizeof(struct RBasic*)*gc->arena_capa);
}
#endif

MODIFY
src/symbol.c
src/symbol.c
@@ -68,7 +68,7 @@ sym_intern(mrb_state *mrb, const char *name, size_t len, mrb_bool lit)
sym = ++mrb->symidx;
if (mrb->symcapa < sym) {
if (mrb->symcapa == 0) mrb->symcapa = 100;
- else mrb->symcapa = (size_t)(mrb->symcapa * 1.2);
+ else mrb->symcapa = (size_t)(mrb->symcapa * 6 / 5);
mrb->symtbl = (symbol_name*)mrb_realloc(mrb, mrb->symtbl, sizeof(symbol_name)*(mrb->symcapa+1));
}
sname = &mrb->symtbl[sym];

Use division expression instead of some floating point literals