mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
treewide: fix unnecessary $ on arithmetic variables
This should fix shellcheck warning SC2004.
This commit is contained in:
parent
27d45db38c
commit
e873a9f18a
@ -139,7 +139,7 @@ _busctl() {
|
||||
fi
|
||||
done
|
||||
|
||||
n=$(($COMP_CWORD - $i))
|
||||
n=$((COMP_CWORD - i))
|
||||
|
||||
if [[ -z ${verb-} ]]; then
|
||||
comps=${VERBS[*]}
|
||||
|
@ -78,7 +78,7 @@ _portablectl() {
|
||||
fi
|
||||
done
|
||||
|
||||
n=$(($COMP_CWORD - $i))
|
||||
n=$((COMP_CWORD - i))
|
||||
|
||||
if [[ -z ${verb-} ]]; then
|
||||
comps=${VERBS[*]}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user