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>
Tue, 8 Jan 2019 18:32:38 +0000 (19:32 +0100)
function                                             old     new   delta
zbc_parse_expr                                      1848    1818     -30

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

index cf0fdd6d81c63838f756e61f3b7c580b5b154673..a343128512a9fd16ce76ee2546e12a127fc29077 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) {