s3:test_net_registry_check: eliminate "local" keyword in shell master3-reauth
authorBjörn Jacke <bj@sernet.de>
Mon, 25 Jun 2012 18:28:22 +0000 (20:28 +0200)
committerBjoern Jacke <bj@sernet.de>
Mon, 25 Jun 2012 22:32:10 +0000 (00:32 +0200)
prefer to use function syntax with (...)  to make variables local

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Jun 26 00:32:11 CEST 2012 on sn-devel-104

source3/script/tests/test_net_registry_check.sh

index 627f67c55a83d3718fcf7ac65ef14ac719d07f8d..ca8da76ffc4f3d8863eeba732255947ae980dca4 100755 (executable)
@@ -69,8 +69,8 @@ regchecknrepair()
 }
 
 test_simple()
-{
-       local ERRSTR=""
+(
+       ERRSTR=""
        cp $REGORIG $REG
 
        regcheck
@@ -78,7 +78,7 @@ test_simple()
                echo $ERRSTR
                return 1
        }
-}
+)
 
 test_damage()
 {
@@ -86,36 +86,36 @@ test_damage()
 }
 
 test_duplicate()
-{
-       local ERRSTR=""
+(
+       ERRSTR=""
        $DBWRAP_TOOL $REG store 'HKLM/SOFTWARE' hex '02000000534F4654574152450053595354454D00'
 
        regchecknrepair "Duplicate subkeylist" 1
-}
+)
 
 test_slashes()
-{
-       local ERRSTR=""
+(
+       ERRSTR=""
        $DBWRAP_TOOL $REG store 'HKLM/SOFTWARE' hex '02000000534F4654574152450053595354454D00'
 
        regchecknrepair "Unnormal key:" 1
-}
+)
 
 test_uppercase()
-{
-       local ERRSTR=""
+(
+       ERRSTR=""
        $DBWRAP_TOOL $REG store 'HKLM\Software' hex '02000000534F4654574152450053595354454D00'
 
        regchecknrepair "Unnormal key:" 1
-}
+)
 
 test_strangeletters()
-{
-       local ERRSTR=""
+(
+       ERRSTR=""
        $DBWRAP_TOOL $REG store 'HKLM\SOFTWARE' hex '02000000534F4654574FABFABFABFAB354454D00'
 
        regchecknrepair "Conversion error: Incomplete multibyte sequence" 1
-}
+)
 
 testit "simple" \
        test_simple || \