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>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8502 (master)
(cherry picked from commit 63fd943282
)
Change-Id: If8a4a43c6822fa1b32217a0b783cb96d0fee2644
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9835
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
199f14e3fd
commit
8aafde8856
@ -648,11 +648,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")
|
||||
|
Loading…
Reference in New Issue
Block a user