treewide: fix unnecessary $ on arithmetic variables

This should fix shellcheck warning SC2004.
This commit is contained in:
Dmitry V. Levin 2023-03-31 08:00:00 +00:00 committed by Mike Yuan
parent 27d45db38c
commit e873a9f18a
5 changed files with 7 additions and 7 deletions

View file

@ -139,7 +139,7 @@ _busctl() {
fi
done
n=$(($COMP_CWORD - $i))
n=$((COMP_CWORD - i))
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}

View file

@ -78,7 +78,7 @@ _portablectl() {
fi
done
n=$(($COMP_CWORD - $i))
n=$((COMP_CWORD - i))
if [[ -z ${verb-} ]]; then
comps=${VERBS[*]}

View file

@ -591,7 +591,7 @@ test_ambient_caps() {
# CAP_CHOWN | CAP_KILL
MASK=$(((1 << 0) | (1 << 5)))
if [ $(("$BND" & "$MASK")) -ne "$MASK" ] ; then
if [ $((BND & MASK)) -ne "$MASK" ] ; then
echo "CAP_CHOWN or CAP_KILL not available in bounding set, skipping test." >&2
return
fi

View file

@ -4,7 +4,7 @@ set -ex
if [ -f /tmp/testsuite-57.counter ] ; then
read -r counter < /tmp/testsuite-57.counter
counter=$(("$counter" + 1))
counter=$((counter + 1))
else
counter=0
fi

View file

@ -116,13 +116,13 @@ LEAVE=0
function reload() {
systemd-notify --reloading --status="Adding 11 to exit status"
EXIT_STATUS=\$((\$EXIT_STATUS + 11))
EXIT_STATUS=\$((EXIT_STATUS + 11))
systemd-notify --ready --status="Back running"
}
function leave() {
systemd-notify --stopping --status="Adding 7 to exit status"
EXIT_STATUS=\$((\$EXIT_STATUS + 7))
EXIT_STATUS=\$((EXIT_STATUS + 7))
LEAVE=1
return 0
}
@ -138,7 +138,7 @@ while [ \$LEAVE = 0 ] ; do
done
systemd-notify --status="Adding 3 to exit status"
EXIT_STATUS=\$((\$EXIT_STATUS + 3))
EXIT_STATUS=\$((EXIT_STATUS + 3))
exit \$EXIT_STATUS
EOF