This is an automated email from Gerrit. Marc Schink (d...@zapb.de) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/6284
-- gerrit commit 3a989ecd88d4b416e496b32e68c76b36a671387a Author: Marc Schink <d...@zapb.de> Date: Sat May 29 12:09:28 2021 +0200 target/startup.tcl: Do not use 'Yoda conditions' Change-Id: I5e1bbaf032659dda1b365ef4ec6ea4a635d921ce Signed-off-by: Marc Schink <d...@zapb.de> diff --git a/src/target/startup.tcl b/src/target/startup.tcl index 54a3942..ad274fa 100644 --- a/src/target/startup.tcl +++ b/src/target/startup.tcl @@ -31,13 +31,13 @@ proc ocd_process_reset_inner { MODE } { # If this target must be halted... set halt -1 - if { 0 == [string compare $MODE halt] } { + if { [string compare $MODE halt] == 0 } { set halt 1 } - if { 0 == [string compare $MODE init] } { + if { [string compare $MODE init] == 0 } { set halt 1; } - if { 0 == [string compare $MODE run ] } { + if { [string compare $MODE run ] == 0 } { set halt 0; } if { $halt < 0 } { @@ -130,14 +130,14 @@ proc ocd_process_reset_inner { MODE } { # Did we succeed? set s [$t curstate] - if { 0 != [string compare $s "halted" ] } { + if { [string compare $s "halted" ] != 0 } { return -code error [format "TARGET: %s - Not halted" $t] } } } #Pass 2 - if needed "init" - if { 0 == [string compare init $MODE] } { + if { [string compare init $MODE] == 0 } { foreach t $targets { if {[using_jtag] && ![jtag tapisenabled [$t cget -chain-position]]} { continue --