tcl/memory: fix syntax errors
Using a command in an expression requires a bracketed command substitution. These syntax errors were caught by tclint v0.2.5 (https://github.com/nmoroze/tclint): ``` tclint tcl/memory.tcl | grep "syntax error" ``` Change-Id: I510d46222f4fb02d6ef73121b231d5b2df77e5c0 Signed-off-by: Noah Moroze <noahmoroze@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8279 Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Tested-by: jenkins
This commit is contained in:
parent
c7c4d4d48c
commit
eecba412cd
|
@ -66,10 +66,10 @@ proc iswithin { ADDRESS BASE LEN } {
|
|||
proc address_info { ADDRESS } {
|
||||
|
||||
foreach WHERE { FLASH RAM MMREGS XMEM UNKNOWN } {
|
||||
if { info exists $WHERE } {
|
||||
if { [info exists $WHERE] } {
|
||||
set lmt [set N_[set WHERE]]
|
||||
for { set region 0 } { $region < $lmt } { incr region } {
|
||||
if { iswithin $ADDRESS $WHERE($region,BASE) $WHERE($region,LEN) } {
|
||||
if { [iswithin $ADDRESS $WHERE($region,BASE) $WHERE($region,LEN)] } {
|
||||
return "$WHERE $region";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue