summaryrefslogtreecommitdiff
path: root/m68k_core.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2019-03-11 00:04:48 -0700
committerMichael Pavone <pavone@retrodev.com>2019-03-11 00:04:48 -0700
commite2281e5a19682d44435b1015c4ce4a64b7e3b586 (patch)
treef2292fce0eb4690470f73c583047719c691be96f /m68k_core.c
parent3d12dcb00997921347170b7f87b54f787a80c678 (diff)
Minor cleanup
Diffstat (limited to 'm68k_core.c')
-rw-r--r--m68k_core.c4
1 files changed, 1 insertions, 3 deletions
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;