From e2281e5a19682d44435b1015c4ce4a64b7e3b586 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Mon, 11 Mar 2019 00:04:48 -0700 Subject: Minor cleanup --- m68k_core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'm68k_core.c') diff --git a/m68k_core.c b/m68k_core.c index 56013e7..ddd540a 100644 --- a/m68k_core.c +++ b/m68k_core.c @@ -1216,9 +1216,7 @@ void m68k_options_free(m68k_options *opts) m68k_context * init_68k_context(m68k_options * opts, m68k_reset_handler reset_handler) { - size_t ctx_size = sizeof(m68k_context) + ram_size(&opts->gen) / (1 << opts->gen.ram_flags_shift) / 8; - m68k_context * context = malloc(ctx_size); - memset(context, 0, ctx_size); + m68k_context * context = calloc(1, sizeof(m68k_context) + ram_size(&opts->gen) / (1 << opts->gen.ram_flags_shift) / 8); context->options = opts; context->int_cycle = CYCLE_NEVER; context->status = 0x27; -- cgit v1.2.3