]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
Tcl: Use lshift instead of open-coding with lrange
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 1 Sep 2015 18:33:55 +0000 (19:33 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 7 Sep 2015 16:44:21 +0000 (17:44 +0100)
In ms-queuedaemon, and JobDB-Executive, once each.  No functional
change.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
ms-queuedaemon
tcl/JobDB-Executive.tcl

index e15bc79ff0be0e0bd496c966ade2f2b20f461882..d6d59eeb71860f584fe8a6965661a3929a430656 100755 (executable)
@@ -210,8 +210,7 @@ proc queuerun-perhaps-step {} {
         return
     }
 
-    set thinking [lindex $queue_running 0]
-    set queue_running [lrange $queue_running 1 end]
+    set thinking [lshift queue_running]
     log-event "queuerun-perhaps-step selected"
 
     set thinking_after [after [expr {$c(QueueThoughtsTimeout) * 1000}] \
index 7228712f185eba0a6f655fe5a8e5f64fb72ad5cf..d61d2a23baff49915cba654ccbaca4d00cf1d531 100644 (file)
@@ -74,8 +74,7 @@ proc set-flight {} {
         set argv [lrange $argv 2 end]
     }
 
-    set flight [lindex $argv 0]
-    set argv [lrange $argv 1 end]
+    set flight [lshift argv]
     set env(OSSTEST_FLIGHT) $flight
 }