diff options
author | Kir Kolyshkin <kolyshkin@gmail.com> | 2022-08-31 10:34:39 -0700 |
---|---|---|
committer | Tom Hromatka <tom.hromatka@oracle.com> | 2022-09-21 15:25:54 -0600 |
commit | 94f684f858673365c8dc103affe54de698f63421 (patch) | |
tree | a8fd081b5a143fb0675b92246e6711d1b6a63579 | |
parent | 9fd0aef44dc103281d1048900a04ac8231fb4d52 (diff) | |
download | libseccomp-94f684f858673365c8dc103affe54de698f63421.tar.gz |
arch: disambiguate $(( in arch-syscall-validate
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 <kolyshkin@gmail.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
-rwxr-xr-x | src/arch-syscall-validate | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch-syscall-validate b/src/arch-syscall-validate index 082ac56..0cb4d8f 100755 --- a/src/arch-syscall-validate +++ b/src/arch-syscall-validate @@ -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 ( |