← Commit list

452df923f

Denys Vlasenko
Denys Vlasenko
2018-12-05
SUCCESS Duration: 149s

Subject

bc: trivial simplification in bc_parse_return()

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/bc.c+1 -4
@@ -4047,14 +4047,11 @@ static BcStatus bc_parse_return(BcParse *p)
else {
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) {
bc_parse_push(p, BC_INST_RET0);
s = bc_lex_next(&p->l);
- if (s) return s;
}
+ if (s) return s;
if (!paren || p->l.t.last != BC_LEX_RPAREN) {
s = bc_posix_error("POSIX requires parentheses around return expressions");