aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-05 20:28:26 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-05 20:28:26 +0100
commit452df923f7f5ae47f3076d7da562946af6123ca9 (patch)
tree3868de0675a4a617055638bf15b92cffce0650e6
parent657d6bb26265205556dcf3191f4a7c6ea26e9689 (diff)
downloadbusybox-452df923f7f5ae47f3076d7da562946af6123ca9.tar.gz
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>
-rw-r--r--miscutils/bc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 656ecd892..b454d4b2b 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -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");