From be1e0c6506ed892a7e8031d69b1a7110a79070d4 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 8 Jan 2013 10:06:06 -0500 Subject: parseopts: remove superfluous continue/shift statements Found via apron. Signed-off-by: Dave Reisner --- functions | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'functions') diff --git a/functions b/functions index 573fbb8..5a44ac9 100644 --- a/functions +++ b/functions @@ -90,25 +90,21 @@ parseopts() { return 1 else OPTRET+=("--$opt") - shift - continue 2 fi ;; 1) # --longopt=optarg if [[ $optarg ]]; then OPTRET+=("--$opt" "$optarg") - shift # --longopt optarg elif [[ $2 ]]; then OPTRET+=("--$opt" "$2" ) - shift 2 + shift else printf "%s: option '--%s' requires an argument\n" "${0##*/}" "$opt" OPTRET=(--) return 1 fi - continue 2 ;; 254) # ambiguous option -- error was reported for us by longoptmatch() -- cgit v1.2.3-24-g4f1b