diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-19 17:15:04 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-19 17:15:04 +0100 |
commit | f36a0adf8b1d2720880d84dcbcb800b904aedad5 (patch) | |
tree | 446aaf906d78bb0c1ab1aa440bcd0c6ee42357af /miscutils | |
parent | dfe1dd20318e79423634593725e2d0229fb19fd3 (diff) | |
download | busybox-w32-f36a0adf8b1d2720880d84dcbcb800b904aedad5.tar.gz busybox-w32-f36a0adf8b1d2720880d84dcbcb800b904aedad5.tar.bz2 busybox-w32-f36a0adf8b1d2720880d84dcbcb800b904aedad5.zip |
bc: remove unnecessary union use
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/bc.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c index d62a852d5..12e3079f1 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
@@ -4964,7 +4964,6 @@ static BcVec* bc_program_search(char *id, bool var) | |||
4964 | BcId e, *ptr; | 4964 | BcId e, *ptr; |
4965 | BcVec *v, *map; | 4965 | BcVec *v, *map; |
4966 | size_t i; | 4966 | size_t i; |
4967 | BcResultData data; | ||
4968 | int new; | 4967 | int new; |
4969 | 4968 | ||
4970 | v = var ? &G.prog.vars : &G.prog.arrs; | 4969 | v = var ? &G.prog.vars : &G.prog.arrs; |
@@ -4975,8 +4974,9 @@ static BcVec* bc_program_search(char *id, bool var) | |||
4975 | new = bc_map_insert(map, &e, &i); // 1 if insertion was successful | 4974 | new = bc_map_insert(map, &e, &i); // 1 if insertion was successful |
4976 | 4975 | ||
4977 | if (new) { | 4976 | if (new) { |
4978 | bc_array_init(&data.v, var); | 4977 | BcVec v2; |
4979 | bc_vec_push(v, &data.v); | 4978 | bc_array_init(&v2, var); |
4979 | bc_vec_push(v, &v2); | ||
4980 | } | 4980 | } |
4981 | 4981 | ||
4982 | ptr = bc_vec_item(map, i); | 4982 | ptr = bc_vec_item(map, i); |
@@ -5860,7 +5860,6 @@ static BC_STATUS zbc_program_call(char *code, size_t *idx) | |||
5860 | size_t i, nparams; | 5860 | size_t i, nparams; |
5861 | BcFunc *func; | 5861 | BcFunc *func; |
5862 | BcId *a; | 5862 | BcId *a; |
5863 | BcResultData param; | ||
5864 | BcResult *arg; | 5863 | BcResult *arg; |
5865 | 5864 | ||
5866 | nparams = bc_program_index(code, idx); | 5865 | nparams = bc_program_index(code, idx); |
@@ -5896,11 +5895,13 @@ static BC_STATUS zbc_program_call(char *code, size_t *idx) | |||
5896 | v = bc_program_search(a->name, a->idx); | 5895 | v = bc_program_search(a->name, a->idx); |
5897 | 5896 | ||
5898 | if (a->idx) { | 5897 | if (a->idx) { |
5899 | bc_num_init_DEF_SIZE(¶m.n); | 5898 | BcNum n2; |
5900 | bc_vec_push(v, ¶m.n); | 5899 | bc_num_init_DEF_SIZE(&n2); |
5900 | bc_vec_push(v, &n2); | ||
5901 | } else { | 5901 | } else { |
5902 | bc_array_init(¶m.v, true); | 5902 | BcVec v2; |
5903 | bc_vec_push(v, ¶m.v); | 5903 | bc_array_init(&v2, true); |
5904 | bc_vec_push(v, &v2); | ||
5904 | } | 5905 | } |
5905 | } | 5906 | } |
5906 | 5907 | ||