Skip to content

Commit

Permalink
Revert "Correct local assigment then return code check"
Browse files Browse the repository at this point in the history
This reverts commit d439921.
  • Loading branch information
portante committed May 24, 2022
1 parent 04715fb commit add7416
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions agent/base
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,7 @@ function vercmp {
local _exp_ver="${3}"
local _ins_ver="${4}"

# Note we declare `_stderr` local without an initializer because the return
# code of rpmdev-vercmp would be overwritten by the return code of the
# "local" declaration.
local _stderr
_stderr=$(rpmdev-vercmp "${_ins_ver}" "${_exp_ver}" 2>&1 > /dev/null)
local _stderr=$(rpmdev-vercmp "${_ins_ver}" "${_exp_ver}" 2>&1 > /dev/null)
local _res=${?}
if [[ ${_res} -ne 0 && ${_res} -ne 11 && ${_res} -ne 12 ]]; then
error_log "rpmdev-vercmp - ${_stderr}"
Expand Down
2 changes: 0 additions & 2 deletions agent/bench-scripts/pbench-fio
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ function usage {
}

function fio_process_options() {
local opts
opts=$(getopt -q -o b:c:d:hj:r:s:t: --longoptions "help,max-stddev:,max-failures:,samples:,direct:,sync:,pre-check,clients:,client-file:,iodepth:,ioengine:,config:,jobs-per-dev:,job-mode:,rate-iops:,ramptime:,runtime:,test-types:,block-sizes:,file-size:,targets:,tool-group:,postprocess-only:,run-dir:,numjobs:,job-file:,sysinfo:,pre-iteration-script:,histogram-interval-sec:,histogram-interval-msec:,unique-ports" -n "getopt.sh" -- "$@")
if [ $? -ne 0 ]; then
printf -- "${script_name} $*\n"
Expand All @@ -169,7 +168,6 @@ function fio_process_options() {
exit 1
fi
eval set -- "$opts"
local arg
while true; do
arg="${1}"
shift
Expand Down

0 comments on commit add7416

Please sign in to comment.