bc: remove "empty expression" check/message, parsing fails in these cases anyway
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 8 Jan 2019 18:32:38 +0000 (19:32 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 14 Feb 2019 13:40:57 +0000 (14:40 +0100)
function                                             old     new   delta
zbc_parse_expr                                      1848    1818     -30

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/bc.c

index 6dd8c9d1f063f1aa8162d52ec30e58ef68103a9b..cef0637bfe030d46958ad84f5b436404c69c73b5 100644 (file)
@@ -4780,9 +4780,10 @@ static BC_STATUS zbc_parse_expr(uint8_t flags)
                        break;
                case BC_LEX_RPAREN:
                        dbg_lex("%s:%d LEX_RPAREN", __func__, __LINE__);
-                       if (p->lex_last == BC_LEX_LPAREN) {
-                               RETURN_STATUS(bc_error("empty expression"));
-                       }
+//why?
+//                     if (p->lex_last == BC_LEX_LPAREN) {
+//                             RETURN_STATUS(bc_error_at("empty expression"));
+//                     }
                        if (bin_last || prev == XC_INST_BOOL_NOT)
                                RETURN_STATUS(bc_error_bad_expression());
                        if (nparens == 0) {