commit:     2a1527cd4b327b9ed0da4e2705903e6bd6e69443
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  6 13:45:12 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Sep  6 13:45:12 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a1527cd

eapi7-ver.eclass: Remove now-redundant vars

 eclass/eapi7-ver.eclass | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/eclass/eapi7-ver.eclass b/eclass/eapi7-ver.eclass
index 27571bc0d03..065a27974a9 100644
--- a/eclass/eapi7-ver.eclass
+++ b/eclass/eapi7-ver.eclass
@@ -51,7 +51,7 @@ _version_split() {
 }
 
 version_cut() {
-       local start end istart
+       local start end
        local -a comp
 
        _version_parse_range "$1"
@@ -59,14 +59,12 @@ version_cut() {
 
        local IFS=
        if [[ ${start} -gt 0 ]]; then
-               istart=$(( start*2 - 1 ))
-       else
-               istart=0
+               start=$(( start*2 - 1 ))
        fi
        if [[ ${end} ]]; then
-               echo "${comp[*]:istart:end*2-istart}"
+               echo "${comp[*]:start:end*2-start}"
        else
-               echo "${comp[*]:istart}"
+               echo "${comp[*]:start}"
        fi
 }
 

Reply via email to