[PATCH 15/16] testsuite: default to shift in the getopt loop

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

 



The getopt loop used to bear by default and only some
options had to explicitly call 'shift' and 'continue'
to process further elements.

Change this to a 'normal' loop, shifting the next arg by default
and breaking of the loop when needed.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 validation/test-suite | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/validation/test-suite b/validation/test-suite
index 098cc7869..8c0453590 100755
--- a/validation/test-suite
+++ b/validation/test-suite
@@ -510,13 +510,9 @@ while [ "$#" -gt "0" ]; do
 	case "$1" in
 	-a|--abort)
 		abort=1
-		shift
-		continue
 		;;
 	-q|--quiet)
 		vquiet=1
-		shift
-		continue
 		;;
 
 	single|--single)
@@ -541,8 +537,6 @@ while [ "$#" -gt "0" ]; do
 
 	*.c)
 		tests_list="$tests_list $1"
-		shift
-		continue
 		;;
 	*)
 		if [ ! -d "$1" ]; then
@@ -550,11 +544,9 @@ while [ "$#" -gt "0" ]; do
 			exit 1
 		fi
 		tests_list="$tests_list $(find "$1" -name '*.c' | sort)"
-		shift
-		continue
 		;;
 	esac
-	break
+	shift
 done
 
 if [ -z "$tests_list" ]; then
-- 
2.15.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux