]> sourceware.org Git - lvm2.git/commitdiff
TEST (lvconvert-raid): localize a function variable
authorJonathan Brassow <jbrassow@redhat.com>
Tue, 26 Jun 2012 03:25:46 +0000 (22:25 -0500)
committerJonathan Brassow <jbrassow@redhat.com>
Tue, 26 Jun 2012 03:25:46 +0000 (22:25 -0500)
Function was overwriting a global variable because it used a variable
of the same name without first declaring it with 'local'.

test/shell/lvconvert-raid.sh

index e7df1649231ad3612916f0af7196d020ca8c07f6..6c289a86b9873e99aee0ab7307c6a843d43f5dc8 100644 (file)
@@ -60,6 +60,7 @@ is_in_sync_() {
 
 # wait_for_sync <VG/LV>
 wait_for_sync_() {
+       local i
        for i in {1..100} ; do
                is_in_sync_ $1 && return
                sleep 1
This page took 0.040428 seconds and 5 git commands to generate.