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: Michal Berger <michalx.berger@intel.com>
Change-Id: If8a4a43c6822fa1b32217a0b783cb96d0fee2644
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8502
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Michal Berger 2021-06-24 16:07:46 +02:00 committed by Jim Harris
parent 8c176db2ca
commit 63fd943282

View File

@ -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")