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

makepkg: remove unnecessary variable presence check

It is unnecessary to check for a variables existence before
looping over it.

Extracted from patch supplied by Andres P <aepd87@gmail.com>

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2010-08-05 21:12:11 +10:00 committed by Dan McGee
parent 68d8bfa0b5
commit f04530eb61

View File

@ -1285,14 +1285,12 @@ check_sanity() {
done
fi
if [[ -n "${PKGLIST[@]}" ]]; then
for pkg in ${PKGLIST[@]}; do
if ! in_array $pkg ${pkgname[@]}; then
error "$(gettext "requested package %s is not provided in %s")" "$pkg" "$BUILDFILE"
return 1
fi
done
fi
for pkg in ${PKGLIST[@]}; do
if ! in_array $pkg ${pkgname[@]}; then
error "$(gettext "requested package %s is not provided in %s")" "$pkg" "$BUILDFILE"
return 1
fi
done
return 0
}