From c1dcc4dd898c2d6f214dcc7ea23de73ab37cef7b Mon Sep 17 00:00:00 2001 From: jnqnfe Date: Tue, 6 Jan 2015 03:36:55 +0000 Subject: aliases: simplify excessively complex In_list function This function is never used to find multiple needles at one time. Gbp-Dch: Short Closes: #952915 --- functions/aliases.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/functions/aliases.sh b/functions/aliases.sh index 3df028f61..7ec1cd3f2 100755 --- a/functions/aliases.sh +++ b/functions/aliases.sh @@ -15,18 +15,15 @@ Find_files () In_list () { - NEEDLES="${1}" + local NEEDLE="${1}" shift for ITEM in ${@} do - for NEEDLE in ${NEEDLES} - do - if [ "${NEEDLE}" = "${ITEM}" ] - then - return 0 - fi - done + if [ "${NEEDLE}" = "${ITEM}" ] + then + return 0 + fi done return 1 -- cgit v1.2.3