diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/shell/ash.c b/shell/ash.c index c27ab7de2..ec887e088 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -5451,15 +5451,8 @@ ash_arith(const char *s) | |||
5451 | 5451 | ||
5452 | INT_OFF; | 5452 | INT_OFF; |
5453 | result = arith(&math_state, s); | 5453 | result = arith(&math_state, s); |
5454 | if (math_state.errcode < 0) { | 5454 | if (math_state.errmsg) |
5455 | if (math_state.errcode == -3) | 5455 | ash_msg_and_raise_error(math_state.errmsg); |
5456 | ash_msg_and_raise_error("exponent less than 0"); | ||
5457 | if (math_state.errcode == -2) | ||
5458 | ash_msg_and_raise_error("divide by zero"); | ||
5459 | if (math_state.errcode == -5) | ||
5460 | ash_msg_and_raise_error("expression recursion loop detected"); | ||
5461 | raise_error_syntax(s); | ||
5462 | } | ||
5463 | INT_ON; | 5456 | INT_ON; |
5464 | 5457 | ||
5465 | return result; | 5458 | return result; |