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-18 20:30:22 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2023-06-18 20:30:22 +0300
commit10cce8ae35654585a09d6e839dd502f04b81599d (patch)
treedf0692147819bad41afb5b825a4ce9775590d2a0
parent7701b526a720c4a84839174fe6b084d831ac90c9 (diff)
shell/math: explain why we use separate &end
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/math.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/math.c b/shell/math.c
index 6784eeeb0..0b30e089d 100644
--- a/shell/math.c
+++ b/shell/math.c
@@ -706,7 +706,7 @@ evaluate_string(arith_state_t *math_state, const char *expr)
char *end;
numstackptr->var_name = NULL;
errno = 0;
- end = (char*) expr; /* separate variable to go on stack */
+ /* code is smaller compared to using &expr here: */
numstackptr->val = strto_arith_t(expr, &end);
expr = end;
dbg("[%d] val:%lld", (int)(numstackptr - numstack), numstackptr->val);