gc.c (mrb_incremental_gc): clarify the if-condition

This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-06-06 11:29:48 +09:00
parent 8b8e186688
commit 336b7efb41
+3 -5
View File
@@ -1284,11 +1284,9 @@ mrb_incremental_gc(mrb_state *mrb)
mrb_full_gc(mrb);
}
}
else if (is_minor_gc(gc)) {
if (gc->live > gc->oldgen_threshold) {
clear_all_old(mrb, gc);
gc->full = TRUE;
}
else if (is_minor_gc(gc) && gc->live > gc->oldgen_threshold) {
clear_all_old(mrb, gc);
gc->full = TRUE;
}
}
}