I think that the current form: if ( !is_remote } { # Do non-remote stuff and return } # Do remote stuff
is not very clear and that this would be more readable. if ( !is_remote } { # Do non-remote stuff } else { # Do remote stuff } That's all. ChangeLog: * lib/remote.exp (standard_file); Add else clause. --- lib/remote.exp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/remote.exp b/lib/remote.exp index bddf2ae..688680b 100644 --- a/lib/remote.exp +++ b/lib/remote.exp @@ -762,21 +762,22 @@ proc standard_file { dest op args } { return } } - } - switch $op { - exists { - set status [remote_exec $dest "test -f $file"] - return [lindex $status 0] - } - delete { - set file "" - # Allow multiple files to be deleted at once. - foreach x $args { - append file " $x" + } else { + switch $op { + exists { + set status [remote_exec $dest "test -f $file"] + return [lindex $status 0] + } + delete { + set file "" + # Allow multiple files to be deleted at once. + foreach x $args { + append file " $x" + } + verbose "remote_file deleting $file" + set status [remote_exec $dest "rm -f $file"] + return [lindex $status 0] } - verbose "remote_file deleting $file" - set status [remote_exec $dest "rm -f $file"] - return [lindex $status 0] } } } -- 2.5.1 _______________________________________________ DejaGnu mailing list DejaGnu@gnu.org https://lists.gnu.org/mailman/listinfo/dejagnu