check_format: Fixes for shellcheck's SC2268 directive

SC2268: Avoid x-prefix in comparisons as it no longer serves a purpose

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ica5ddfa8c39f34741c7344906abe802ff7451b1f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8505
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: <tomasz.rochumski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Michal Berger 2021-06-24 17:09:14 +02:00 committed by Jim Harris
parent 742f04b3f7
commit dd2b935dc4
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ rpc_py="$rootdir/scripts/rpc.py -s $(get_vhost_dir 0)/rpc.sock"
for vm_conf in "${vms[@]}"; do
IFS=',' read -ra conf <<< "$vm_conf"
if [[ x"${conf[0]}" == x"" ]] || ! assert_number ${conf[0]}; then
if [[ -z ${conf[0]} ]] || ! assert_number ${conf[0]}; then
fail "invalid VM configuration syntax $vm_conf"
fi

View File

@ -88,7 +88,7 @@ function print_test_fio_header() {
function vms_setup() {
for vm_conf in "${vms[@]}"; do
IFS=',' read -ra conf <<< "$vm_conf"
if [[ x"${conf[0]}" == x"" ]] || ! assert_number ${conf[0]}; then
if [[ -z ${conf[0]} ]] || ! assert_number ${conf[0]}; then
fail "invalid VM configuration syntax $vm_conf"
fi