commit: 3943295b9cf6624a85a0263dcdb76bfaa4d182b8
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Aug 14 11:14:18 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 28 02:30:18 2025 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3943295b
60openrc: jettison a superfluous for loop
Presently, the openrc_check() function contains a loop that iterates
exactly once. Get rid of it, along with the SC2043 warning that
accompanied it.
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
bin/install-qa-check.d/60openrc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bin/install-qa-check.d/60openrc b/bin/install-qa-check.d/60openrc
index 8b0ab0a8dd..17b84fa057 100644
--- a/bin/install-qa-check.d/60openrc
+++ b/bin/install-qa-check.d/60openrc
@@ -30,8 +30,8 @@ openrc_check() {
local checkbashisms=$(type -P checkbashisms)
if [[ -n ${checkbashisms} ]] ; then
- for d in /etc/init.d ; do
- [[ -d ${ED}${d} ]] || continue
+ d=/etc/init.d
+ if [[ -d ${ED}${d} ]]; then
for i in "${ED}${d}"/* ; do
[[ -e ${i} ]] || continue
[[ -L ${i} ]] && continue
@@ -42,7 +42,7 @@ openrc_check() {
do eqawarn " ${REPLY}"
done <<< "${f//${ED}}"
done
- done
+ fi
fi
}