Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] toolchain-funcs.eclass: Remove meaningless eval
Date: Thu, 23 Feb 2017 19:37:59
Message-Id: 20170223193745.26518-1-mgorny@gentoo.org
1 The 'eval' as used does not do anything. The function name is expanded
2 anyway.
3 ---
4 eclass/toolchain-funcs.eclass | 4 ++--
5 1 file changed, 2 insertions(+), 2 deletions(-)
6
7 diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
8 index 63f0d6b20912..3ca2e05ac74a 100644
9 --- a/eclass/toolchain-funcs.eclass
10 +++ b/eclass/toolchain-funcs.eclass
11 @@ -169,8 +169,8 @@ tc-getBUILD_PKG_CONFIG() { tc-getBUILD_PROG PKG_CONFIG pkg-config "$@"; }
12 tc-export() {
13 local var
14 for var in "$@" ; do
15 - [[ $(type -t tc-get${var}) != "function" ]] && die "tc-export: invalid export variable '${var}'"
16 - eval tc-get${var} > /dev/null
17 + [[ $(type -t "tc-get${var}") != "function" ]] && die "tc-export: invalid export variable '${var}'"
18 + "tc-get${var}" > /dev/null
19 done
20 }
21
22 --
23 2.11.1