From 433e1aeb52247acb6ebed9b7ecba5077eb7a7083 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Mon, 22 May 2006 06:01:35 +0000 Subject: * runtest.exp, baseboards/basic-sim.exp, baseboards/cf.exp, baseboards/cris-sim.exp, baseboards/i960-cyclone.exp, baseboards/mcore-moto-sim.exp, baseboards/mips64vr4100-sim.exp, baseboards/mmixware-sim.exp, baseboards/op50n.exp, baseboards/rom68k-idp.exp, baseboards/sparclite-sim-le.exp, baseboards/usparc-cygmon.exp, config/base-config.exp, config/base68k.exp, config/ddb-ether.exp, config/ddb.exp, config/dos.exp, config/gdb-comm.exp, config/gdb_stub.exp, config/i386-bozo.exp, config/i960.exp, config/m68k-emc.exp, config/netware.exp, config/sid.exp, config/sim.exp, config/tic80.exp, config/unix.exp, config/vxworks.exp, lib/debugger.exp, lib/dejagnu.exp, lib/dg.exp, lib/framework.exp, lib/ftp.exp, lib/kermit.exp, lib/libgloss.exp, lib/remote.exp, lib/rlogin.exp, lib/rsh.exp, lib/target.exp, lib/targetdb.exp, lib/telnet.exp, lib/tip.exp, lib/utils.exp: Put braces around if expressions throughout. --- lib/ftp.exp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/ftp.exp') diff --git a/lib/ftp.exp b/lib/ftp.exp index 0061145..a9510bb 100644 --- a/lib/ftp.exp +++ b/lib/ftp.exp @@ -23,15 +23,15 @@ proc ftp_open {host} { set prompt "ftp>" global board_info - if [board_info $host exists name] { + if {[board_info $host exists name]} { set host [board_info $host name] } - if [board_info $host exists ftp_fileid] { + if {[board_info $host exists ftp_fileid]} { return [board_info $host ftp_fileid] } - if [board_info $host exists hostname] { + if {[board_info $host exists hostname]} { set remotehost [board_info $host hostname] } else { set remotehost $host @@ -62,8 +62,8 @@ proc ftp_open {host} { return -1 } set board_info($host,ftp_fileid) $spawn_id - if [board_info $host exists ftp_username] { - if [board_info $host exists ftp_password] { + if {[board_info $host exists ftp_username]} { + if {[board_info $host exists ftp_password]} { set command "user [board_info $host ftp_username] [board_info $host ftp_password]\n" } else { set command "user [board_info $host ftp_username]\n" @@ -88,7 +88,7 @@ proc ftp_open {host} { return -1 } } - if [board_info $host exists ftp_directory] { + if {[board_info $host exists ftp_directory]} { send "cd [board_info $host ftp_directory]\n" expect { -i $spawn_id -re "250.*$prompt" { } @@ -100,7 +100,7 @@ proc ftp_open {host} { } } - if [board_info $host exists ftp_no_passive] { + if {[board_info $host exists ftp_no_passive]} { send "passive\n" expect { -i $spawn_id -re "Passive mode off.*$prompt" { } @@ -165,7 +165,7 @@ proc ftp_download {host localfile remotefile} { verbose "putting $localfile $remotefile" - if [board_info $host exists hostname] { + if {[board_info $host exists hostname]} { set remotehost [board_info $host hostname] } else { set remotehost $host @@ -220,11 +220,11 @@ proc ftp_download {host localfile remotefile} { proc ftp_close {host} { global board_info - if [board_info $host exists name] { + if {[board_info $host exists name]} { set host [board_info $host name] } - if ![board_info $host exists ftp_fileid] { + if {![board_info $host exists ftp_fileid]} { return "" } -- cgit v1.1