[git commit] shell/math: improve comments
Denys Vlasenko
vda.linux at googlemail.com
Mon Jun 26 09:08:40 UTC 2023
commit: https://git.busybox.net/busybox/commit/?id=e619a25a551ac6a5f215005166371074a9e2816f
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/math.c | 6 ++++--
1 file 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:
More information about the busybox-cvs
mailing list