Commit bf173b32 authored by Tatsuhiko Kubo's avatar Tatsuhiko Kubo

Remove discareded NULL checks.

parent ecda19f4
...@@ -889,9 +889,6 @@ mrb_dump_irep(mrb_state *mrb, mrb_irep *irep, int debug_info, uint8_t **bin, siz ...@@ -889,9 +889,6 @@ mrb_dump_irep(mrb_state *mrb, mrb_irep *irep, int debug_info, uint8_t **bin, siz
section_irep_size + section_lineno_size + section_lv_size + section_irep_size + section_lineno_size + section_lv_size +
sizeof(struct rite_binary_footer); sizeof(struct rite_binary_footer);
cur = *bin = (uint8_t*)mrb_malloc(mrb, *bin_size); cur = *bin = (uint8_t*)mrb_malloc(mrb, *bin_size);
if (cur == NULL) {
goto error_exit;
}
cur += sizeof(struct rite_binary_header); cur += sizeof(struct rite_binary_header);
result = write_section_irep(mrb, irep, cur); result = write_section_irep(mrb, irep, cur);
......
...@@ -229,9 +229,7 @@ mrb_calloc(mrb_state *mrb, size_t nelem, size_t len) ...@@ -229,9 +229,7 @@ mrb_calloc(mrb_state *mrb, size_t nelem, size_t len)
size = nelem * len; size = nelem * len;
p = mrb_realloc(mrb, 0, size); p = mrb_realloc(mrb, 0, size);
if (p) { memset(p, 0, size);
memset(p, 0, size);
}
} }
else { else {
p = NULL; p = NULL;
......
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