aboutsummaryrefslogtreecommitdiff
path: root/miscutils/bc.c
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/bc.c
parent39287e0d0225db167baa34db59a0ae63eecf5a6c (diff)
downloadbusybox-w32-f093e3df2df46f026d5c3f053a6095b5c72387ac.tar.gz
busybox-w32-f093e3df2df46f026d5c3f053a6095b5c72387ac.tar.bz2
busybox-w32-f093e3df2df46f026d5c3f053a6095b5c72387ac.zip
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 '')
-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)
5025 5025
5026#endif // ENABLE_DC 5026#endif // ENABLE_DC
5027 5027
5028#if !ENABLE_BC 5028static BC_STATUS zcommon_parse_expr(BcParse *p)
5029#define common_parse_expr(p, flags) \
5030 common_parse_expr(p)
5031#define flags 0
5032#endif
5033static BC_STATUS common_parse_expr(BcParse *p, uint8_t flags)
5034{ 5029{
5035 if (IS_BC) { 5030 if (IS_BC) {
5036 IF_BC(RETURN_STATUS(zbc_parse_expr(p, flags))); 5031 IF_BC(RETURN_STATUS(zbc_parse_expr(p, 0)));
5037 } else { 5032 } else {
5038 IF_DC(RETURN_STATUS(zdc_parse_expr(p))); 5033 IF_DC(RETURN_STATUS(zdc_parse_expr(p)));
5039 } 5034 }
5040#undef flags
5041} 5035}
5042#define zcommon_parse_expr(...) (common_parse_expr(__VA_ARGS__) COMMA_SUCCESS) 5036#define zcommon_parse_expr(...) (zcommon_parse_expr(__VA_ARGS__) COMMA_SUCCESS)
5043 5037
5044static BcVec* bc_program_search(char *id, bool var) 5038static BcVec* bc_program_search(char *id, bool var)
5045{ 5039{
@@ -5245,7 +5239,7 @@ static BC_STATUS zbc_program_read(void)
5245 5239
5246 s = zbc_parse_text_init(&parse, buf.v); 5240 s = zbc_parse_text_init(&parse, buf.v);
5247 if (s) goto exec_err; 5241 if (s) goto exec_err;
5248 s = zcommon_parse_expr(&parse, 0); 5242 s = zcommon_parse_expr(&parse);
5249 if (s) goto exec_err; 5243 if (s) goto exec_err;
5250 5244
5251 if (parse.l.t.t != BC_LEX_NLINE && parse.l.t.t != BC_LEX_EOF) { 5245 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)
6373 str = *bc_program_str(sidx); 6367 str = *bc_program_str(sidx);
6374 s = zbc_parse_text_init(&prs, str); 6368 s = zbc_parse_text_init(&prs, str);
6375 if (s) goto err; 6369 if (s) goto err;
6376 s = zcommon_parse_expr(&prs, 0); 6370 s = zcommon_parse_expr(&prs);
6377 if (s) goto err; 6371 if (s) goto err;
6378 if (prs.l.t.t != BC_LEX_EOF) { 6372 if (prs.l.t.t != BC_LEX_EOF) {
6379 s = bc_error_bad_expression(); 6373 s = bc_error_bad_expression();