From: Eric Biggers Date: Sat, 6 May 2017 00:19:32 +0000 (-0700) Subject: common/config: make set_prog_path() accept one argument only X-Git-Tag: v2022.05.01~2061 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7b1ae2457c81a214ca9f68be70e539fbad6279a5;p=users%2Fhch%2Fxfstests-dev.git common/config: make set_prog_path() accept one argument only All callers of set_prog_path() pass it only one argument, the program to find on the $PATH. Therefore, to simplify things remove the unused code which allowed fallback paths to be specified in the remaining arguments. Signed-off-by: Eric Biggers Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/config b/common/config index 59041a39d..b29c0eb0e 100644 --- a/common/config +++ b/common/config @@ -93,7 +93,7 @@ export LOCAL_CONFIGURE_OPTIONS=${LOCAL_CONFIGURE_OPTIONS:=--enable-readline=yes} export RECREATE_TEST_DEV=false -# $1 = prog to look for, $2* = default pathnames if not found in $PATH +# $1 = prog to look for set_prog_path() { p=`which $1 2> /dev/null` @@ -101,17 +101,6 @@ set_prog_path() echo $p return 0 fi - p=$1 - - shift - for f; do - if [ -x $f ]; then - echo $f - return 0 - fi - done - - echo "" return 1 }