From: Andreas Schösser Date: Tue, 17 Jul 2007 17:05:30 +0000 (+0000) Subject: Removed modes that were not registered. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=00245e0ad8d3992a00ae63fda651dd560f2b2b0f;p=libfirm Removed modes that were not registered. [r15202] --- diff --git a/ir/ir/irmode.c b/ir/ir/irmode.c index 4dd5a42ef..f4d029a9f 100644 --- a/ir/ir/irmode.c +++ b/ir/ir/irmode.c @@ -53,7 +53,7 @@ static struct obstack modes; /** number of defined modes */ -static int num_modes; +static int num_modes = 0; /* * * * local functions @@ -266,8 +266,10 @@ static ir_mode *register_mode(const ir_mode *new_mode) { mode = (ir_mode *)obstack_copy(&modes, new_mode, sizeof(*mode)); mode->kind = k_ir_mode; - if (num_modes >= irm_max) mode->code = num_modes; - num_modes++; + if (num_modes >= irm_max) { + mode->code = num_modes; + } + num_modes++; /* add the new mode to the irp list of modes */ add_irp_mode(mode);