Skip to content

Commit

Permalink
arch: disambiguate $(( in arch-syscall-validate
Browse files Browse the repository at this point in the history
shellcheck complains:

> In arch-syscall-validate line 785:
> 	sc_list=$((for abi in $abi_list; do
>                 ^-- SC1102 (error): Shells disambiguate $(( differently or not at all. For $(command substitution), add space after $( . For $((arithmetics)), fix parsing errors.

Another tool, shfmt, can't even parse the file:

> arch-syscall-validate:785:17: not a valid arithmetic operator: abi

Add a space to resolve this.

Signed-off-by: Kir Kolyshkin <[email protected]>
Acked-by: Paul Moore <[email protected]>
Signed-off-by: Tom Hromatka <[email protected]>
  • Loading branch information
kolyshkin authored and drakenclimber committed Sep 21, 2022
1 parent 9fd0aef commit 94f684f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/arch-syscall-validate
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,9 @@ function gen_csv() {
eval output_$abi=$(mktemp -t syscall_validate_XXXXXX)
dump_$2_$abi "$1" > $(eval echo $`eval echo output_$abi`)
done
sc_list=$((for abi in $abi_list; do
sc_list=$( (for abi in $abi_list; do
cat $(eval echo $`eval echo output_$abi`);
done) | awk -F "," '{ print $1 }' | sort -u)
done) | awk -F "," '{ print $1 }' | sort -u)

# redirect the subshell to the csv file
(
Expand Down

0 comments on commit 94f684f

Please sign in to comment.