Fix: bashate E043 warnings 71/67571/9
authorGuillaume Lambert <guillaume.lambert@orange.com>
Tue, 4 May 2021 08:14:24 +0000 (10:14 +0200)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Tue, 11 May 2021 19:20:54 +0000 (21:20 +0200)
Arithmetic compound has inconsistent return semantics

((expr)) has a trap that if expr is 0, the return value is 1.
This will trigger a failure with "set -e" and can be very confusing.
It is good defensive programming to avoid this with explicit assignment.

Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I412bd8872560c90c28642ed5433eab9b2a29a5e8


No differences found