Commit faa4de48 authored by Pawel Kaminski's avatar Pawel Kaminski Committed by Jim Harris
Browse files

rpc: Shellcheck - apply rule SC2219



Instead of 'let expr', prefer (( expr )) .

Change-Id: I1d86f87bd56036aabd7f7dc377c59ae42a0dc040
Signed-off-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467285


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 8a74cd9a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ SC2059,SC2068,SC2074,SC2086,SC2088,SC2089,SC2090,SC2091,SC2094,\
SC2097,SC2098,SC2103,SC2115,SC2116,SC2119,SC2120,SC2121,SC2124,SC2126,SC2128,\
SC2129,SC2140,SC2142,SC2143,SC2145,SC2146,SC2148,SC2152,SC2153,SC2154,SC2155,\
SC2162,SC2164,SC2165,SC2166,SC2167,SC2174,SC2178,SC2181,SC2191,SC2192,SC2195,\
SC2199,SC2206,SC2207,SC2209,SC2214,SC2219,SC2223,SC2230,SC2231,SC2235"
SC2199,SC2206,SC2207,SC2209,SC2214,SC2223,SC2230,SC2231,SC2235"
	# SPDK fails some error checks which have been deprecated in later versions of shellcheck.
	# We will not try to fix these error checks, but instead just leave the error types here
	# so that we can still run with older versions of shellcheck.
+2 −2
Original line number Diff line number Diff line
@@ -100,13 +100,13 @@ function detect_rdma_nics()

function allocate_nic_ips()
{
	let count=$NVMF_IP_LEAST_ADDR
	(( count=$NVMF_IP_LEAST_ADDR ))
	for nic_name in $(get_rdma_if_list); do
		ip="$(get_ip_address $nic_name)"
		if [ -z $ip ]; then
			ip addr add $NVMF_IP_PREFIX.$count/24 dev $nic_name
			ip link set $nic_name up
			let count=$count+1
			(( count=$count+1 ))
		fi
		# dump configuration for debug log
		ip addr show $nic_name