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)
commitf1965ead65dbec24eafddcd6e59c793406a4c099
tree1f01182a629d7acaeb5ad5c2456f7fd05df07dda
parent1024ff22b0f0009077227a3b5bfff119beeb4bd1
Fix: bashate E043 warnings

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
ensure-documented.sh
shell/job-cost.sh
shell/rtdv3.sh