From: Stefan Kost Date: Mon, 29 Nov 2010 14:09:52 +0000 (+0200) Subject: orcprog-c: don't deref NULL rule X-Git-Tag: orc-0.4.12~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=30b0abe359c3b21859f18ad6f2e3eddb917099aa;p=platform%2Fupstream%2Forc.git orcprog-c: don't deref NULL rule Continue with next instruction if rule is NULL. Remove setting compiler->error=TRUE twice, the macro does that already. --- diff --git a/orc/orcprogram-c.c b/orc/orcprogram-c.c index 50fedef..4ef9f1f 100644 --- a/orc/orcprogram-c.c +++ b/orc/orcprogram-c.c @@ -318,7 +318,7 @@ orc_compiler_c_assemble (OrcCompiler *compiler) if (!rule) { ORC_COMPILER_ERROR(compiler, "No rule for: %s on target %s", opcode->name, compiler->target->name); - compiler->error = TRUE; + continue; } ORC_ASM_CODE(compiler,"%*s", prefix, ""); if (insn->flags & (ORC_INSTRUCTION_FLAG_X2|ORC_INSTRUCTION_FLAG_X4)) { @@ -356,7 +356,7 @@ orc_compiler_c_assemble (OrcCompiler *compiler) if (!rule) { ORC_COMPILER_ERROR(compiler, "No rule for: %s on target %s", opcode->name, compiler->target->name); - compiler->error = TRUE; + continue; } if (insn->flags & (ORC_INSTRUCTION_FLAG_X2|ORC_INSTRUCTION_FLAG_X4)) {