test/system: Limit the scope of the return value to the function

This should prevent this function from overwriting variables of the
same name beyond the function and causing hard-to-debug problems.

https://github.com/containers/toolbox/pull/1372
This commit is contained in:
Debarshi Ray 2023-09-21 22:12:04 +02:00
parent 12da2b845f
commit d3161ea60e

View file

@ -439,7 +439,7 @@ function container_started() {
start_container "$container_name" start_container "$container_name"
# Used as a return value # Used as a return value
container_initialized=1 local -i container_initialized=1
local -i j local -i j
local num_of_retries=5 local num_of_retries=5