Fix SC2181 warning
PATCH 1/1 Fix SC2181 warning
From: Ritvik Gupta <[email protected]>
Check exit-code directly with '!' instead of '$?'
to improve readability and fix SC2181 warning,
reported by shellcheck.
Signed-off-by Ritvik Gupta <[email protected]>
--- tools/testing/selftests/kselftest_deps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/kselftest_deps.sh +2 -2
@@ -262,8 +262,8 @@ then for lib in $test_libs; do let total_cnt+=1 - $CC -o $tmp_file.bin $lib $tmp_file > /dev/null 2>&1 - if [ $? -ne 0 ]; then + if ! $CC -o $tmp_file.bin $lib $tmp_file > /dev/null 2>&1 + then echo "FAIL: $test dependency check: $lib" >> $fail let fail_cnt+=1 fail_libs+="$lib "
Signature · 1 line
2.48.1