irqstats: rework previous commit to make shellcheck happy

Tested on dash/bash/busybox.
This commit is contained in:
Kim B. Heino 2020-10-09 15:32:36 +03:00
parent 4c53449fa3
commit b2ca6a4b8a
1 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,9 @@ fetch_irqstats() {
VALUE=0
for VAL in $VALS;
do
VALUE=$((VALUE + $VAL))
if [ "$VAL" -eq "$VAL" ] 2> /dev/null; then
VALUE=$((VALUE + VAL))
fi
done
echo "i$ID.value $VALUE"
done