1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

makepkg: Remove pre-optimization from in_array()

The '[[ -z' test in in_array() is redundant, so remove it.

Signed-off-by: DJ Mills <danielmills1@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
DJ Mills 2011-07-08 00:31:22 -04:00 committed by Dan McGee
parent 7f5b24597b
commit 282be6bf4b

View File

@ -319,7 +319,6 @@ in_opt_array() {
##
in_array() {
local needle=$1; shift
[[ -z $1 ]] && return 1 # Not Found
local item
for item in "$@"; do
[[ $item = $needle ]] && return 0 # Found