[PATCH] common/rc: Remove impossible check

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



config_ndevs is guaranteed to be defined in _scratch_dev_pool_get
irrespective of whether SCRATCH_DEV_POOL is defined or not. If it's not
then wc -w will simply return 0 which simply sets config_ndevs to 0.
This causes 'typeset -p config_ndevs' to always succeeds and return 0 so
the check for the return value of typeset is effectively a noop. Just
remove it.

Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>
---
 common/rc | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/common/rc b/common/rc
index 7f693d3922e8..6f7467b574c2 100644
--- a/common/rc
+++ b/common/rc
@@ -921,11 +921,6 @@ _scratch_dev_pool_get()
 	local config_ndevs=`echo $SCRATCH_DEV_POOL| wc -w`
 	local -a devs="( $SCRATCH_DEV_POOL )"
 
-	typeset -p config_ndevs >/dev/null 2>&1
-	if [ $? -ne 0 ]; then
-		_fail "Bug: cant find SCRATCH_DEV_POOL ndevs"
-	fi
-
 	if [ $config_ndevs -lt $test_ndevs ]; then
 		_notrun "Need at least test requested number of ndevs $test_ndevs"
 	fi
-- 
2.17.1




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux