It isn't (and never was) used by anything else in the tree. Inline its
only usage in evar_pop() and drop the function.
---
 eclass/estack.eclass | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/eclass/estack.eclass b/eclass/estack.eclass
index b0177bdb358e..2aa6f366dc12 100644
--- a/eclass/estack.eclass
+++ b/eclass/estack.eclass
@@ -115,7 +115,8 @@ evar_pop() {
        local cnt=${1:-bad}
        case $# in
        0) cnt=1 ;;
-       1) isdigit "${cnt}" || die "${FUNCNAME}: first arg must be a number: 
$*" ;;
+       1) [[ -z ${cnt//[0-9]} ]] \
+               || die "${FUNCNAME}: first arg must be a number: $*" ;;
        *) die "${FUNCNAME}: only accepts one arg: $*" ;;
        esac
 
@@ -197,17 +198,5 @@ eumask_pop() {
        umask ${s} || die "${FUNCNAME}: sanity: could not restore umask: ${s}"
 }
 
-# @FUNCTION: isdigit
-# @USAGE: <number> [more numbers]
-# @DESCRIPTION:
-# Return true if all arguments are numbers.
-isdigit() {
-       local d
-       for d ; do
-               [[ ${d:-bad} == *[!0-9]* ]] && return 1
-       done
-       return 0
-}
-
 _ESTACK_ECLASS=1
 fi #_ESTACK_ECLASS
-- 
2.24.0

Attachment: signature.asc
Description: PGP signature

Reply via email to