Remove unnecessary out of memory check in ary_expand_capa.

Since `mrb_realloc` raises when failed to allocate memory.
This commit is contained in:
take_cheeze
2014-07-07 21:58:38 +09:00
parent 5c50bcd20a
commit 5b0f900faa
-4
View File
@@ -200,10 +200,6 @@ ary_expand_capa(mrb_state *mrb, struct RArray *a, mrb_int len)
if (capa > a->aux.capa) {
mrb_value *expanded_ptr = (mrb_value *)mrb_realloc(mrb, a->ptr, sizeof(mrb_value)*capa);
if (!expanded_ptr) {
mrb_raise(mrb, E_RUNTIME_ERROR, "out of memory");
}
a->aux.capa = capa;
a->ptr = expanded_ptr;
}