aboutsummaryrefslogtreecommitdiff
path: root/libreboot
diff options
context:
space:
mode:
authorAndrew Robbins <contact@andrewrobbins.info>2019-03-28 15:25:33 -0400
committerAndrew Robbins <contact@andrewrobbins.info>2019-03-28 15:25:33 -0400
commit56c93461865222e50915e380b99a34fd4890170e (patch)
treeb3746b6679c5aab0e376040cf163085dfa7e0786 /libreboot
parentee4b0d7419974b0605bed80814d3d22478edf98d (diff)
downloadlibrebootfr-56c93461865222e50915e380b99a34fd4890170e.tar.gz
librebootfr-56c93461865222e50915e380b99a34fd4890170e.zip
libreboot: Set max loop iteration in for loop
Diffstat (limited to 'libreboot')
-rwxr-xr-xlibreboot6
1 files changed, 2 insertions, 4 deletions
diff --git a/libreboot b/libreboot
index 2f3a3ffe..30ea9f63 100755
--- a/libreboot
+++ b/libreboot
@@ -155,12 +155,11 @@ libreboot_setup_include() {
}
libreboot_setup_tool_actions() {
- local -i tool_actions_count="${#TOOL_ACTIONS_GENERIC[@]}"
local ignore="${TOOL_ACTIONS_GENERIC_IGNORE_CHECK[*]}"
local -a tool_actions
- for ((i=0; i<"$tool_actions_count"; i++)); do
+ for ((i=0, nogeneric=${#TOOL_ACTIONS_GENERIC[@]}; i<nogeneric; ++i)); do
tool_actions+=("${TOOL_ACTIONS_GENERIC[i]}")
if [[ "${TOOL_ACTIONS_GENERIC[i]}" == !(${ignore// /|}) ]]; then
@@ -172,12 +171,11 @@ libreboot_setup_tool_actions() {
}
libreboot_setup_project_actions() {
- local -i project_actions_count="${#PROJECT_ACTIONS_GENERIC[@]}"
local ignore="${PROJECT_ACTIONS_GENERIC_IGNORE_CHECK[*]}"
local -a project_actions
- for ((i=0; i<"$project_actions_count"; i++)); do
+ for ((i=0, nogeneric=${#PROJECT_ACTIONS_GENERIC[@]}; i<nogeneric; ++i)); do
project_actions+=("${PROJECT_ACTIONS_GENERIC[i]}")
if [[ "${PROJECT_ACTIONS_GENERIC[i]}" == !(${ignore// /|}) ]]; then