tcl: don't use 'set' to retrieve the value of a variable

Original TLC syntax uses 'set varname' to retrieve the value of
variable 'varname'. Such archaic syntax is still valid, but the
shorter '$varname' makes the code easier to read.

Replace 'set varname' with '$varname'.
While there, remove some useless curly brackets.

Change-Id: I27310e8c05afe56ea8bd0e41d4ae2c34447b725c
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6863
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
Antonio Borneo 2022-03-01 23:21:20 +01:00
parent 5ffc397278
commit 9a6417e035
4 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ proc core_up { args } {
global _TARGETNAME
# examine remaining cores
foreach _core [set args] {
foreach _core $args {
${_TARGETNAME}$_core arp_examine
}
}

View File

@ -19,7 +19,7 @@ proc core_up { args } {
global _TARGETNAME
# examine remaining cores
foreach _core [set args] {
foreach _core $args {
${_TARGETNAME}$_core arp_examine
}
}

View File

@ -72,7 +72,7 @@ proc core_up { args } {
global _TARGETNAME
# Examine remaining cores
foreach _core [set args] {
foreach _core $args {
${_TARGETNAME}$_core arp_examine
}
}

View File

@ -99,7 +99,7 @@ targets $_TARGETNAME.0
proc core_up { args } {
global _TARGETNAME
foreach { core } [set args] {
foreach core $args {
$_TARGETNAME.$core arp_examine
}
}