From: Christoph Mallon Date: Fri, 20 Feb 2009 16:45:42 +0000 (+0000) Subject: Marginally simplify parse_goto(). X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=5171b1ed8734251606a22a11dafee155055d9a24;p=cparser Marginally simplify parse_goto(). [r25535] --- diff --git a/parser.c b/parser.c index 6f63a8a..657c5a0 100644 --- a/parser.c +++ b/parser.c @@ -10495,19 +10495,17 @@ static statement_t *parse_goto(void) } statement->gotos.expression = expression; - } else { - if (token.type != T_IDENTIFIER) { - if (GNU_MODE) - parse_error_expected("while parsing goto", T_IDENTIFIER, '*', NULL); - else - parse_error_expected("while parsing goto", T_IDENTIFIER, NULL); - eat_until_anchor(); - goto end_error; - } + } else if (token.type == T_IDENTIFIER) { symbol_t *symbol = token.v.symbol; next_token(); - statement->gotos.label = get_label(symbol); + } else { + if (GNU_MODE) + parse_error_expected("while parsing goto", T_IDENTIFIER, '*', NULL); + else + parse_error_expected("while parsing goto", T_IDENTIFIER, NULL); + eat_until_anchor(); + goto end_error; } /* remember the goto's in a list for later checking */