bc: trivial simplification in bc_parse_return()
function old new delta bc_parse_stmt 2276 2271 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
657d6bb262
commit
452df923f7
@ -4047,14 +4047,11 @@ static BcStatus bc_parse_return(BcParse *p)
|
|||||||
else {
|
else {
|
||||||
|
|
||||||
s = bc_parse_expr(p, 0, bc_parse_next_expr);
|
s = bc_parse_expr(p, 0, bc_parse_next_expr);
|
||||||
if (s && s != BC_STATUS_PARSE_EMPTY_EXP)
|
|
||||||
return s;
|
|
||||||
|
|
||||||
if (s == BC_STATUS_PARSE_EMPTY_EXP) {
|
if (s == BC_STATUS_PARSE_EMPTY_EXP) {
|
||||||
bc_parse_push(p, BC_INST_RET0);
|
bc_parse_push(p, BC_INST_RET0);
|
||||||
s = bc_lex_next(&p->l);
|
s = bc_lex_next(&p->l);
|
||||||
if (s) return s;
|
|
||||||
}
|
}
|
||||||
|
if (s) return s;
|
||||||
|
|
||||||
if (!paren || p->l.t.last != BC_LEX_RPAREN) {
|
if (!paren || p->l.t.last != BC_LEX_RPAREN) {
|
||||||
s = bc_posix_error("POSIX requires parentheses around return expressions");
|
s = bc_posix_error("POSIX requires parentheses around return expressions");
|
||||||
|
Loading…
Reference in New Issue
Block a user