Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2023-06-17 01:28:49 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2023-06-17 01:28:49 +0300
commitd6f98f214b3bd242f7404b68a4f9d777114fffa3 (patch)
treea5d1f6826634ac8bd5b6065c52a13222abceb2aa
parent550696d492c7389927d3f335bed11aa4decbcae6 (diff)
shell/math: code shrink
function old new delta evaluate_string 1432 1414 -18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/math.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/math.c b/shell/math.c
index 2959e57ea..56f866bf2 100644
--- a/shell/math.c
+++ b/shell/math.c
@@ -889,9 +889,9 @@ dbg(" numstack:%d val:%lld '%s'", (int)(numstackptr - numstack), numstackptr[
*/
if (math_state->evaluation_disabled & TOP_BIT_ULL)
goto err; /* >63 levels of ?: nesting not supported */
- math_state->evaluation_disabled <<= 1;
- if (numstackptr[-1].val == 0)
- math_state->evaluation_disabled |= 1;
+ math_state->evaluation_disabled =
+ (math_state->evaluation_disabled << 1)
+ | (numstackptr[-1].val == 0);
dbg("'?' entered: evaluation_disabled=%llx", EVAL_DISABLED);
}
} /* if */