diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-01-08 19:32:38 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-01-08 19:32:38 +0100 |
| commit | a1698a15dc93e429732d513ecfa3f1be723b51c5 (patch) | |
| tree | dc7d425f8259ab6ec1596fa7f5f5aecd86bf6a44 | |
| parent | 132d7c098b1f74ae9b85fc47c15ce4f35c9dd86a (diff) | |
| download | busybox-w32-a1698a15dc93e429732d513ecfa3f1be723b51c5.tar.gz busybox-w32-a1698a15dc93e429732d513ecfa3f1be723b51c5.tar.bz2 busybox-w32-a1698a15dc93e429732d513ecfa3f1be723b51c5.zip | |
bc: remove "empty expression" check/message, parsing fails in these cases anyway
function old new delta
zbc_parse_expr 1848 1818 -30
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | miscutils/bc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c index cf0fdd6d8..a34312851 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
| @@ -4780,9 +4780,10 @@ static BC_STATUS zbc_parse_expr(uint8_t flags) | |||
| 4780 | break; | 4780 | break; |
| 4781 | case BC_LEX_RPAREN: | 4781 | case BC_LEX_RPAREN: |
| 4782 | dbg_lex("%s:%d LEX_RPAREN", __func__, __LINE__); | 4782 | dbg_lex("%s:%d LEX_RPAREN", __func__, __LINE__); |
| 4783 | if (p->lex_last == BC_LEX_LPAREN) { | 4783 | //why? |
| 4784 | RETURN_STATUS(bc_error("empty expression")); | 4784 | // if (p->lex_last == BC_LEX_LPAREN) { |
| 4785 | } | 4785 | // RETURN_STATUS(bc_error_at("empty expression")); |
| 4786 | // } | ||
| 4786 | if (bin_last || prev == XC_INST_BOOL_NOT) | 4787 | if (bin_last || prev == XC_INST_BOOL_NOT) |
| 4787 | RETURN_STATUS(bc_error_bad_expression()); | 4788 | RETURN_STATUS(bc_error_bad_expression()); |
| 4788 | if (nparens == 0) { | 4789 | if (nparens == 0) { |
