From 0024820148e6a8d481c712a03a3e004b65272d21 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 27 Oct 2004 08:48:15 +0000 Subject: [PATCH] Clear the ir_op after creation, so all operations get initialized with NULL [r4219] --- ir/ir/irop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ir/ir/irop.c b/ir/ir/irop.c index eafc2109e..85e7f20c4 100644 --- a/ir/ir/irop.c +++ b/ir/ir/irop.c @@ -93,7 +93,9 @@ new_ir_op(opcode code, const char *name, op_pin_state p, unsigned flags, op_arit { ir_op *res; - res = (ir_op *) xmalloc (sizeof (ir_op)); + res = (ir_op *)xmalloc(sizeof(*res)); + memset(res, 0, sizeof(*res)); + res->code = code; res->name = new_id_from_chars(name, strlen(name)); res->op_pin_state_pinned = p; -- 2.20.1