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:
parent
5ffc397278
commit
9a6417e035
|
@ -17,7 +17,7 @@ proc core_up { args } {
|
||||||
global _TARGETNAME
|
global _TARGETNAME
|
||||||
|
|
||||||
# examine remaining cores
|
# examine remaining cores
|
||||||
foreach _core [set args] {
|
foreach _core $args {
|
||||||
${_TARGETNAME}$_core arp_examine
|
${_TARGETNAME}$_core arp_examine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ proc core_up { args } {
|
||||||
global _TARGETNAME
|
global _TARGETNAME
|
||||||
|
|
||||||
# examine remaining cores
|
# examine remaining cores
|
||||||
foreach _core [set args] {
|
foreach _core $args {
|
||||||
${_TARGETNAME}$_core arp_examine
|
${_TARGETNAME}$_core arp_examine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ proc core_up { args } {
|
||||||
global _TARGETNAME
|
global _TARGETNAME
|
||||||
|
|
||||||
# Examine remaining cores
|
# Examine remaining cores
|
||||||
foreach _core [set args] {
|
foreach _core $args {
|
||||||
${_TARGETNAME}$_core arp_examine
|
${_TARGETNAME}$_core arp_examine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ targets $_TARGETNAME.0
|
||||||
|
|
||||||
proc core_up { args } {
|
proc core_up { args } {
|
||||||
global _TARGETNAME
|
global _TARGETNAME
|
||||||
foreach { core } [set args] {
|
foreach core $args {
|
||||||
$_TARGETNAME.$core arp_examine
|
$_TARGETNAME.$core arp_examine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue