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:
parent
68d8bfa0b5
commit
f04530eb61
1 changed files with 6 additions and 8 deletions
|
@ -1285,14 +1285,12 @@ check_sanity() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${PKGLIST[@]}" ]]; then
|
|
||||||
for pkg in ${PKGLIST[@]}; do
|
for pkg in ${PKGLIST[@]}; do
|
||||||
if ! in_array $pkg ${pkgname[@]}; then
|
if ! in_array $pkg ${pkgname[@]}; then
|
||||||
error "$(gettext "requested package %s is not provided in %s")" "$pkg" "$BUILDFILE"
|
error "$(gettext "requested package %s is not provided in %s")" "$pkg" "$BUILDFILE"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue