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-26 12:08:40 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2023-06-26 12:08:40 +0300
commite619a25a551ac6a5f215005166371074a9e2816f (patch)
treeb989f18f6f49d7abf707e36f342bea1633ad3dc4
parent5d8f8570c0c4220bfadb6d24d4fbc3e722d44802 (diff)
shell/math: improve comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/math.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/shell/math.c b/shell/math.c
index 0426e2daa..9e81d604c 100644
--- a/shell/math.c
+++ b/shell/math.c
@@ -856,9 +856,11 @@ evaluate_string(arith_state_t *math_state, const char *expr)
*/
prec = PREC(op);
if (prec != PREC_LPAREN && prec < UNARYPREC) {
- /* binary, ternary or RPAREN */
+ /* Binary, ternary or RPAREN */
if (lasttok != TOK_VALUE) {
- /* must be preceded by a num (example?) */
+ /* Must be preceded by a value.
+ * $((2 2 + * 3)) would be accepted without this.
+ */
goto syntax_err;
}
/* if op is RPAREN: