summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenys Vlasenko2018-12-03 21:46:41 +0100
committerDenys Vlasenko2018-12-05 15:43:35 +0100
commitabbc433d29307ee1e42f3a98c55b3d8e75a42350 (patch)
treeeb2f8d06cd65b9e4f3c0d92b82152b6703166d24 /miscutils
parent04a1c763a621f6995e6875f0a4674314ff21c44d (diff)
downloadbusybox-abbc433d29307ee1e42f3a98c55b3d8e75a42350.zip
busybox-abbc433d29307ee1e42f3a98c55b3d8e75a42350.tar.gz
bc: convert BC_STATUS_PARSE_NO_AUTO
function old new delta bc_parse_auto 275 291 +16 bc_err_msgs 172 168 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 16/-4) Total: 12 bytes text data bss dec hex filename 987911 485 7296 995692 f316c busybox_old 987923 485 7296 995704 f3178 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/bc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 0d81e13..2bde515 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -189,7 +189,7 @@ typedef enum BcStatus {
BC_STATUS_PARSE_BAD_PRINT,
BC_STATUS_PARSE_BAD_FUNC,
BC_STATUS_PARSE_BAD_ASSIGN,
- BC_STATUS_PARSE_NO_AUTO,
+// BC_STATUS_PARSE_NO_AUTO,
BC_STATUS_PARSE_DUPLICATE_LOCAL,
BC_STATUS_PARSE_NO_BLOCK_END,
@@ -261,7 +261,7 @@ static const char *const bc_err_msgs[] = {
"bad function definition",
"bad assignment: left side must be scale, ibase, "
"obase, last, var, or array element",
- "no auto variable found",
+// "no auto variable found",
"function parameter or auto var has the same name as another",
"block end could not be found",
@@ -4509,7 +4509,7 @@ static BcStatus bc_parse_auto(BcParse *p)
}
if (comma) return BC_STATUS_PARSE_BAD_FUNC;
- if (!one) return BC_STATUS_PARSE_NO_AUTO;
+ if (!one) return bc_error("no auto variable found");
if (p->l.t.t != BC_LEX_NLINE && p->l.t.t != BC_LEX_SCOLON)
return BC_STATUS_PARSE_BAD_TOKEN;