From: Michael Beck Date: Wed, 27 Oct 2004 08:48:15 +0000 (+0000) Subject: Clear the ir_op after creation, so all operations get initialized with NULL X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=0024820148e6a8d481c712a03a3e004b65272d21;p=libfirm Clear the ir_op after creation, so all operations get initialized with NULL [r4219] --- 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;