* Remove surplus semicolons in `for' commands.
authorBen Elliston <bje@gnu.org>
Thu, 7 Aug 2003 03:58:36 +0000 (03:58 +0000)
committerBen Elliston <bje@gnu.org>
Thu, 7 Aug 2003 03:58:36 +0000 (03:58 +0000)
14 files changed:
baseboards/usparc-cygmon.exp
config/base68k.exp
config/ddb-ether.exp
config/ddb.exp
config/dos.exp
config/gdb-comm.exp
config/gdb_stub.exp
config/i960.exp
config/m68k-emc.exp
config/vxworks.exp
lib/ftp.exp
lib/kermit.exp
lib/remote.exp
lib/rlogin.exp

index 076c03c9d425e2885ee41bb54aa7f0ba63903637..6584f57109d10557234cecc927b67f29f4d25d53 100644 (file)
@@ -24,7 +24,7 @@ proc ${board}_init { dest } {
        remote_send $dest "\n"
        set got_one 0
        remote_expect $dest 5 {
-           -re "$shell_prompt" { set got_one 1; exp_continue; }
+           -re "$shell_prompt" { set got_one 1; exp_continue }
            default {
                if { ! $got_one } {
                    remote_close $dest
index c76bd57a0b5080eed579364443b4e0cdf069aa37..f8fb3616f83b7e44e0d2a1bd2c3b220ff21535b1 100644 (file)
@@ -92,7 +92,7 @@ proc base68k_ld { dest prog } {
     }
 
     set got_p 0
-    for { set tries 0; } { (! $got_p) && $tries < 5 } { incr tries } {
+    for { set tries 0 } { (! $got_p) && $tries < 5 } { incr tries } {
        remote_send $dest "\r\n\r\n"
        remote_expect $dest 5 {
            -re "${shell_prompt}$" {
@@ -279,7 +279,7 @@ proc base68k_load { dest prog args } {
     set shell_prompt [board_info $dest shell_prompt]
 
     if { [llength $args] > 0 } {
-       for { set x 0; } { $x < [llength $args] } { incr x ; } {
+       for { set x 0 } { $x < [llength $args] } { incr x } {
            if { [lindex $args $x] != "" } {
                verbose -log "Cannot pass parameters or input file to this target"
                return [list "unsupported" ""]
index 88c707ebad80035d5ee1cff056e6a9f1569ac4fc..336763c57ec3388c61b531d4afd0ce53fdc12f66 100644 (file)
@@ -27,7 +27,7 @@ proc ${board}_init { dest } {
        set doing_ddb_init 1
 
        remote_close $dest
-       for { set x 0; } { $x < 3 } { incr x; } {
+       for { set x 0 } { $x < 3 } { incr x } {
            set shell_id [remote_open $dest]
            if { $shell_id == "" || $shell_id < 0 } {
                remote_reboot $dest
@@ -54,7 +54,7 @@ proc ${board}_init { dest } {
 }
 
 proc ddb_ether_load { dest prog args } {
-    for { set x 0; } { $x < 3 } { incr x } {
+    for { set x 0 } { $x < 3 } { incr x } {
        set result [eval remote_spawn \{$dest\} \{$prog\} $args]
        if { $result < 0 } {
            remote_reboot $dest
index 89ceb558ef2f1d0804d9a6f3340e15d5851b4104..71a1a3f8fa05fbaf28635def5a22f33f90b4a44c 100644 (file)
@@ -41,9 +41,9 @@ proc ${board}_init { dest } {
     if ![info exists doing_ddb_init] {
        set doing_ddb_init 1
 
-       for { set i 1; } { $i <= 3 } {incr i } {
+       for { set i 1 } { $i <= 3 } { incr i } {
            remote_close $dest
-           for { set x 0; } { $x < 3 } { incr x; } {
+           for { set x 0 } { $x < 3 } { incr x } {
                set shell_id [remote_open $dest]
                if { $shell_id == "" || $shell_id < 0 } {
                    remote_reboot $dest
index 4a52113ead39829f78ac1c0e74b85707f7cc7fb5..8fc3b1375549107945d8e0602a3587f0f889a9df 100644 (file)
@@ -185,7 +185,7 @@ proc dos_exec { dest program pargs inp outp } {
 
     # Make a DOS batch file; we use @echo off so we don't have to see
     # the DOS command prompts and such.
-    for { set i 0; } { $i < 2 } { incr i } {
+    for { set i 0 } { $i < 2 } { incr i } {
        set exit_status -1
        verbose "calling open"
        set batfile [dos_prep_command $dest "$cmdline$inp$outpf"]
@@ -222,7 +222,7 @@ proc dos_start_command { cmdline dest } {
     set shell_prompt [board_info $dest shell_prompt]
     set prefix ""
     set ok 0
-    for {set i 0;} {$i <= 2 && ! $ok} {incr i;} {
+    for { set i 0 } {$i <= 2 && ! $ok} { incr i } {
        set shell_id [remote_open $dest]
        if { $shell_id != "" && $shell_id > 0 } {
            remote_send $dest "echo k\r"
@@ -287,7 +287,7 @@ proc dos_spawn { dest program args } {
     verbose "running $program on $dest"
     set remotebat [dos_prep_command $dest $program]
 
-    for { set x 0; } { $x < 3 } { incr x } {
+    for { set x 0 } { $x < 3 } { incr x } {
        if { [dos_start_command $remotebat $dest] == "" } {
            return [board_info $dest fileid]
        }
index 6c7d67eee80889dfd42bf7b5c295ac29fc103c08..9d20509a7a3dfffac8084faba45a904a753853d5 100644 (file)
@@ -253,7 +253,7 @@ proc gdb_comm_load { dest prog args } {
     global timeout
     set argnames { "command-line arguments" "input file" "output file" }
 
-    for { set x 0; } { $x < [llength $args] } { incr x } {
+    for { set x 0 } { $x < [llength $args] } { incr x } {
        if { [lindex $args $x] != "" } {
            return [list "unsupported" "no support for [lindex $argnames $x] on this target"]
        }
@@ -431,7 +431,7 @@ proc gdb_comm_load { dest prog args } {
                -re ".*$gdb_prompt $" {
                    remote_send host "signal 0\n"
                    remote_expect host 10 {
-                       -re "signal 0\[\r\n\]+" { exp_continue; }
+                       -re "signal 0\[\r\n\]+" { exp_continue }
                        -re "Continuing(\\.| with no signal\\.)\[\r\n\]" {}
                    }
                }
index 746316ceac796b5d2e2b241f072e6f3a85d4b864..4f88b7a7932b00e0d17dd1087325d97feac81b9f 100644 (file)
@@ -50,7 +50,7 @@ proc gdb_stub_restart { dest } {
 
     gdb_stub_init $dest
 
-    for {set x 1;} { $x < 4 } {incr x} {
+    for { set x 1 } { $x < 4 } {incr x} {
        remote_close $dest
        sleep 2
        set command "$GDB -nw -nx"
@@ -394,7 +394,7 @@ proc gdb_stub_start { dest } {
 }
 
 proc gdb_stub_spawn { dest prog args } {
-    for { set x 0; } { $x < 3 } { incr x } {
+    for { set x 0 } { $x < 3 } { incr x } {
        if { [remote_ld $dest $prog] != 1 } {
            return [list "fail" "remote_ld failed"]
        }
@@ -475,7 +475,7 @@ proc gdb_stub_load { dest prog args } {
     global gdb_prompt
     set argnames { "command-line arguments" "input file" "output file" }
 
-    for { set x 0; } { $x < [llength $args] } { incr x } {
+    for { set x 0 } { $x < [llength $args] } { incr x } {
        if { [lindex $args $x] != "" } {
            return [list "unsupported" "no support for [lindex $argnames $x] on this target"]
        }
index 1c722d69facd65ba044cb5c1fac71fdd47c5b678..c44c0f543253780df60172e9689cc40b526099ec 100644 (file)
@@ -34,7 +34,7 @@ proc ${board}_init { dest } {
 
     remote_close $dest
     if { [remote_open $dest] != "" } {
-       for { set tries 0; } { $tries < 7 && ! $done } { incr tries } {
+       for { set tries 0 } { $tries < 7 && ! $done } { incr tries } {
            remote_send $dest "\n"
            remote_expect $dest 1 {
                -re "${prompt}" {
@@ -129,7 +129,7 @@ proc i960_ld { dest prog } {
 proc i960_spawn { dest prog args } {
     set shell_prompt [board_info $dest shell_prompt]
 
-    for { set tries 0 } { $tries < 3 } { incr tries } {
+    for { set tries 0 } { $tries < 3 } { incr tries } {
        set result [remote_ld $dest $prog]
        if { $result == 0 } {
            set comm "go [board_info $dest start_addr]"
@@ -185,7 +185,7 @@ proc i960_wait { dest timeout } {
 }
 
 proc i960_load { dest prog args } {
-    for { set x 0; } { $x < 3 } { incr x; } {
+    for { set x 0 } { $x < 3 } { incr x } {
        set id [eval remote_spawn \{$dest\} \{$prog\} $args]
        if { $id < 0 } {
            return [list "fail" ""]
index d6db29b42923de20a861f966180ffe98447b3772..60bda420bb64eb0808e4f45541de71a9d4d99141 100644 (file)
@@ -37,7 +37,7 @@ proc m68k_emc_board_connect { dest } {
     set board_info($tname,m68k_connected) 1
     set dos_host [board_info $dest dos_host]
 
-    for { set x 0; } { $x < 3 } { incr x; } {
+    for { set x 0 } { $x < 3 } { incr x } {
        set shell_id [remote_open $dos_host]
        if { $shell_id == "" || $shell_id < 0 } {
            remote_reboot $dos_host
@@ -54,7 +54,7 @@ proc m68k_emc_board_connect { dest } {
     }
     # Flush the buffer.
     remote_expect $dos_host 2 {
-       -re ".+" { exp_continue; }
+       -re ".+" { exp_continue }
     }
     # Get past first menu.
     remote_send $dos_host "\n"
index e47d5d81bcb505ccf123c85973dc9cbacb3deee5..233ae5abaa64915e38fcfd869c10f3d8857602f6 100644 (file)
@@ -69,7 +69,7 @@ proc ${board}_init { dest } {
     remote_send $dest "\n\n"
     remote_expect $dest 3 {
        timeout {}
-       -re ".+" { exp_continue; }
+       -re ".+" { exp_continue }
     }
     remote_send $dest "p\n"
     remote_expect $dest 20 {
@@ -286,16 +286,16 @@ proc vxworks_ld { dest prog } {
     # If the load fails we want `expect_out' stored in the log and this
     # saves duplicating that code.
 
-    for { set x 0 ; } { $x < 3 } {incr x; } {
+    for { set x 0 } { $x < 3 } { incr x } {
        remote_send $dest "\n"
        remote_expect $dest 30 {
-           -re ".*$shell_prompt $" { set x 20; }
+           -re ".*$shell_prompt $" { set x 20 }
            -re "\\\[VxWorks Boot\\\]:" {
                remote_send $dest "@\n"
                sleep 20
                exp_continue
            }
-           timeout { return -1; }
+           timeout { return -1 }
        }
     }
 
@@ -462,7 +462,7 @@ proc vxworks_load {dest prog args} {
        set outp ""
     }
 
-    for { set x 0; } { $x < 3 } { incr x } {
+    for { set x 0 } { $x < 3 } { incr x } {
        set status [vxworks_ld $dest $prog]
        if { $status >= 0 } {
            if { $status > 0 } {
index 9259a6750d9318ee836e60f971deae9747e26b47..c3df24d0dcb7d87702c1f6be3b4085785f3683e3 100644 (file)
@@ -145,7 +145,7 @@ proc ftp_upload { host remotefile localfile } {
                set loop 0
                set remotefile ""
            }
-           -i $spawn_id -re "(^|\[\r\n\])226.*$prompt" { set loop 0; }
+           -i $spawn_id -re "(^|\[\r\n\])226.*$prompt" { set loop 0 }
            -i $spawn_id -re "(^|\[\r\n\])\[0-9\]\[0-9\]\[0-9\].*$prompt" {
                set loop 0
                set remotefile ""
index 0d46bb8a22074449cfb36a05ad787daa51573a27..ed31f403c318b2b632d80a4ee5138e8a93fbb9fb 100644 (file)
@@ -116,10 +116,10 @@ proc kermit_command { dest args } {
     # Sometimes we have to send multiple ^\c sequences. Don't know
     # why.
     set timeout 2
-    for { set i 1; } {$i<=5} {incr i} {
+    for { set i 1 } { $i <= 5 } { incr i } {
        send -i $shell_id "\1cc"
        expect {
-           -i $shell_id -re ".*Back at.*ermit.*>.*$" { set i 10;}
+           -i $shell_id -re ".*Back at.*ermit.*>.*$" { set i 10 }
            -i $shell_id timeout {
                if { $i > 2 } {
                    warning "Unable to get prompt from kermit."
index 6c1155417e252bc4a8a92c70fc1e8dcdec0e3842..0b3748e3b0b5b367e8bdc7a04d62d967c2c414e3 100644 (file)
@@ -895,7 +895,7 @@ proc remote_load { dest prog args } {
     if { [board_info $dest exists is_simulator] || [getenv REMOTELOAD_CACHE] == "" } {
        set empty 0
     } else {
-       for { set x 0; } {$x < [llength $args] } {incr x} {
+       for { set x 0 } {$x < [llength $args] } {incr x} {
            if { [lindex $args $x] != "" } {
                set empty 0
                break
@@ -1197,7 +1197,7 @@ proc remote_expect { board timeout args } {
        set spawn_id 1000
     }
 
-    for { set i 0; } { $i < [llength $args] } { incr i ; }  {
+    for { set i 0 } { $i < [llength $args] } { incr i }  {
        if { $need_append } {
            append res "\n-i $spawn_id "
            set need_append 0
index 8fe32a5fb6382be26af91102ec561d60a89542ca..ec915e4f2bb4e709cfe4ce8a94310e996eb4fdcc 100644 (file)
@@ -142,7 +142,7 @@ proc rlogin_spawn { dest cmdline } {
     }
     set prefix ""
     set ok 0
-    for {set i 0;} {$i <= 2 && ! $ok} {incr i;} {
+    for { set i 0 } {$i <= 2 && ! $ok} { incr i } {
        set shell_id [remote_open $dest]
        if { $shell_id != "" && $shell_id > 0 } {
            remote_send $dest "echo k\r"