Commit 63fd9432 authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

check_format: Fixes for shellcheck's SC2269 directive



SC2269: This variable is assigned to itself, so the assignment does
        nothing.

Since the --id check doesn't change the value of $id, remove it
completely. This simplifies the process_shm() so the --id type is
considered to a be default and $id changed only in case --pid was
explicitly requested.

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: If8a4a43c6822fa1b32217a0b783cb96d0fee2644
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8502


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@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 8c176db2
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -679,11 +679,6 @@ function process_shm() {
	id=$2
	if [ "$type" = "--pid" ]; then
		id="pid${id}"
	elif [ "$type" = "--id" ]; then
		id="${id}"
	else
		echo "Please specify to search for pid or shared memory id."
		return 1
	fi

	shm_files=$(find /dev/shm -name "*.${id}" -printf "%f\n")