diff options
author | Denys Vlasenko | 2018-12-17 21:14:05 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-12-18 03:30:23 +0100 |
commit | 57734c926bbfe69d1c3bb6096fbdf428628ed838 (patch) | |
tree | 390a8423cce5c4c62dce4f555b8c6ae48c42bc51 /miscutils | |
parent | f6e3f8511e3257022302ad82a6dd6951ff1eae52 (diff) | |
download | busybox-57734c926bbfe69d1c3bb6096fbdf428628ed838.zip busybox-57734c926bbfe69d1c3bb6096fbdf428628ed838.tar.gz |
bc: fold zbc_num_stream() into its single caller
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/bc.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c index c65555f..e5ad0ed 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c @@ -5486,14 +5486,6 @@ static BC_STATUS zbc_num_printBase(BcNum *n) } #define zbc_num_printBase(...) (zbc_num_printBase(__VA_ARGS__) COMMA_SUCCESS) -#if ENABLE_DC -static BC_STATUS zbc_num_stream(BcNum *n, BcNum *base) -{ - RETURN_STATUS(zbc_num_printNum(n, base, 1, bc_num_printChar)); -} -#define zbc_num_stream(...) (zbc_num_stream(__VA_ARGS__) COMMA_SUCCESS) -#endif - static BC_STATUS zbc_num_print(BcNum *n, bool newline) { BcStatus s = BC_STATUS_SUCCESS; @@ -6259,9 +6251,9 @@ static BC_STATUS zbc_program_printStream(void) s = zbc_program_num(r, &n, false); if (s) RETURN_STATUS(s); - if (BC_PROG_NUM(r, n)) - s = zbc_num_stream(n, &G.prog.strmb); - else { + if (BC_PROG_NUM(r, n)) { + s = zbc_num_printNum(n, &G.prog.strmb, 1, bc_num_printChar); + } else { idx = (r->t == BC_RESULT_STR) ? r->d.id.idx : n->rdx; str = *bc_program_str(idx); printf("%s", str); |