toolchain-funcs.eclass: Remove meaningless eval
authorMichał Górny <mgorny@gentoo.org>
Thu, 23 Feb 2017 19:35:52 +0000 (20:35 +0100)
committerMichał Górny <mgorny@gentoo.org>
Wed, 8 Mar 2017 07:35:36 +0000 (08:35 +0100)
The 'eval' as used does not do anything. The function name is expanded
anyway.

eclass/toolchain-funcs.eclass

index dec786994f2d284d934ee1e9c3b90cc2f7cbf8f1..a0c359a950b241a3313e353982c3d4321090e8f5 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: toolchain-funcs.eclass
@@ -168,8 +168,8 @@ tc-getBUILD_PKG_CONFIG() { tc-getBUILD_PROG PKG_CONFIG pkg-config "$@"; }
 tc-export() {
        local var
        for var in "$@" ; do
-               [[ $(type -t tc-get${var}) != "function" ]] && die "tc-export: invalid export variable '${var}'"
-               eval tc-get${var} > /dev/null
+               [[ $(type -t "tc-get${var}") != "function" ]] && die "tc-export: invalid export variable '${var}'"
+               "tc-get${var}" > /dev/null
        done
 }