aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-22 02:30:18 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-22 02:30:18 +0100
commitf093e3df2df46f026d5c3f053a6095b5c72387ac (patch)
tree9cff9d1d113acaac7b7d5688b1d7e039555a4d78 /miscutils
parent39287e0d0225db167baa34db59a0ae63eecf5a6c (diff)
downloadbusybox-f093e3df2df46f026d5c3f053a6095b5c72387ac.tar.gz
bc: zcommon_parse_expr() lost its flags argument
function old new delta zcommon_parse_expr - 28 +28 zdc_program_execStr 474 472 -2 zbc_program_exec 4023 4021 -2 common_parse_expr 29 - -29 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 28/-33) Total: -5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/bc.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 65f98afc2..1c47fba1d 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -5025,21 +5025,15 @@ static BC_STATUS zdc_parse_parse(BcParse *p)
#endif // ENABLE_DC
-#if !ENABLE_BC
-#define common_parse_expr(p, flags) \
- common_parse_expr(p)
-#define flags 0
-#endif
-static BC_STATUS common_parse_expr(BcParse *p, uint8_t flags)
+static BC_STATUS zcommon_parse_expr(BcParse *p)
{
if (IS_BC) {
- IF_BC(RETURN_STATUS(zbc_parse_expr(p, flags)));
+ IF_BC(RETURN_STATUS(zbc_parse_expr(p, 0)));
} else {
IF_DC(RETURN_STATUS(zdc_parse_expr(p)));
}
-#undef flags
}
-#define zcommon_parse_expr(...) (common_parse_expr(__VA_ARGS__) COMMA_SUCCESS)
+#define zcommon_parse_expr(...) (zcommon_parse_expr(__VA_ARGS__) COMMA_SUCCESS)
static BcVec* bc_program_search(char *id, bool var)
{
@@ -5245,7 +5239,7 @@ static BC_STATUS zbc_program_read(void)
s = zbc_parse_text_init(&parse, buf.v);
if (s) goto exec_err;
- s = zcommon_parse_expr(&parse, 0);
+ s = zcommon_parse_expr(&parse);
if (s) goto exec_err;
if (parse.l.t.t != BC_LEX_NLINE && parse.l.t.t != BC_LEX_EOF) {
@@ -6373,7 +6367,7 @@ static BC_STATUS zdc_program_execStr(char *code, size_t *bgn, bool cond)
str = *bc_program_str(sidx);
s = zbc_parse_text_init(&prs, str);
if (s) goto err;
- s = zcommon_parse_expr(&prs, 0);
+ s = zcommon_parse_expr(&prs);
if (s) goto err;
if (prs.l.t.t != BC_LEX_EOF) {
s = bc_error_bad_expression();