This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6863

-- gerrit

commit af696b4d6e918c0d6032586d005b4f9af659f23b
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Tue Mar 1 23:21:20 2022 +0100

    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.anto...@gmail.com>

diff --git a/tcl/board/lemaker_hikey.cfg b/tcl/board/lemaker_hikey.cfg
index ee677c34b8..325b6fdda0 100644
--- a/tcl/board/lemaker_hikey.cfg
+++ b/tcl/board/lemaker_hikey.cfg
@@ -17,7 +17,7 @@ proc core_up { args } {
        global _TARGETNAME
 
        # examine remaining cores
-       foreach _core [set args] {
+       foreach _core $args {
                ${_TARGETNAME}$_core arp_examine
        }
 }
diff --git a/tcl/board/tocoding_poplar.cfg b/tcl/board/tocoding_poplar.cfg
index 6d2e6354e5..36d5aec47d 100644
--- a/tcl/board/tocoding_poplar.cfg
+++ b/tcl/board/tocoding_poplar.cfg
@@ -19,7 +19,7 @@ proc core_up { args } {
        global _TARGETNAME
 
        # examine remaining cores
-       foreach _core [set args] {
+       foreach _core $args {
                ${_TARGETNAME}$_core arp_examine
        }
 }
diff --git a/tcl/target/bluefield.cfg b/tcl/target/bluefield.cfg
index 62b1e31650..dcebb2fb11 100644
--- a/tcl/target/bluefield.cfg
+++ b/tcl/target/bluefield.cfg
@@ -72,7 +72,7 @@ proc core_up { args } {
        global _TARGETNAME
 
        # Examine remaining cores
-       foreach _core [set args] {
+       foreach _core $args {
                ${_TARGETNAME}$_core arp_examine
        }
 }
diff --git a/tcl/target/xilinx_zynqmp.cfg b/tcl/target/xilinx_zynqmp.cfg
index e66289a707..2df7a4ff91 100644
--- a/tcl/target/xilinx_zynqmp.cfg
+++ b/tcl/target/xilinx_zynqmp.cfg
@@ -99,7 +99,7 @@ targets $_TARGETNAME.0
 
 proc core_up { args } {
     global _TARGETNAME
-    foreach { core } [set args] {
+    foreach core $args {
         $_TARGETNAME.$core arp_examine
     }
 }

-- 

Reply via email to