diff options
author | Denys Vlasenko | 2023-06-16 19:43:53 +0200 |
---|---|---|
committer | Denys Vlasenko | 2023-06-16 19:51:01 +0200 |
commit | e1279858394a6079be6816cbedaa3f10e74057cc (patch) | |
tree | 7a7a032ea71978437c8888c9f508db1d4fdf4fe3 /shell/math.h | |
parent | f8263528cd44ac5dc95778556c6fd3feea14742e (diff) | |
download | busybox-e1279858394a6079be6816cbedaa3f10e74057cc.zip busybox-e1279858394a6079be6816cbedaa3f10e74057cc.tar.gz |
shell/math: fix ?: to not evaluate not-taken branches
This fixes ash-arith-arith-ternary1/2.tests
function old new delta
evaluate_string 1271 1432 +161
arith_apply 968 1000 +32
arith 22 36 +14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 207/0) Total: 207 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/math.h')
-rw-r--r-- | shell/math.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/math.h b/shell/math.h index 41ef6e8..452ddad 100644 --- a/shell/math.h +++ b/shell/math.h @@ -73,13 +73,12 @@ typedef long arith_t; typedef const char* FAST_FUNC (*arith_var_lookup_t)(const char *name); typedef void FAST_FUNC (*arith_var_set_t)(const char *name, const char *val); -//typedef const char* FAST_FUNC (*arith_var_endofname_t)(const char *name); typedef struct arith_state_t { const char *errmsg; arith_var_lookup_t lookupvar; arith_var_set_t setvar; -// arith_var_endofname_t endofname; + uint64_t evaluation_disabled; void *list_of_recursed_names; } arith_state_t; |