* 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 076c03c..6584f57 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 c76bd57..f8fb361 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 88c707e..336763c 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 89ceb55..71a1a3f 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 4a52113..8fc3b13 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 6c7d67e..9d20509 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 746316c..4f88b7a 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 1c722d6..c44c0f5 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 d6db29b..60bda42 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 e47d5d8..233ae5a 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 9259a67..c3df24d 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 0d46bb8..ed31f40 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 6c11554..0b3748e 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 8fe32a5..ec915e4 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"