From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH 01/13] Tcl: Use lshift instead of open-coding with lrange Date: Thu, 3 Sep 2015 11:44:39 +0100 Message-ID: <1441277079.26292.336.camel@citrix.com> References: <1441208719-31336-1-git-send-email-ian.jackson@eu.citrix.com> <1441208719-31336-2-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZXS0Z-0000Zx-3p for xen-devel@lists.xenproject.org; Thu, 03 Sep 2015 10:44:43 +0000 In-Reply-To: <1441208719-31336-2-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Wed, 2015-09-02 at 16:45 +0100, Ian Jackson wrote: > In ms-queuedaemon, and JobDB-Executive, once each. No functional > change. > > Signed-off-by: Ian Jackson Acked-by: Ian Campbell (Caveat: I don't speak a lot of tcl, but seems plausible. Same caveat for all tcl patches here...) > --- > ms-queuedaemon | 3 +-- > tcl/JobDB-Executive.tcl | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/ms-queuedaemon b/ms-queuedaemon > index e15bc79..d6d59ee 100755 > --- a/ms-queuedaemon > +++ b/ms-queuedaemon > @@ -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}] \ > diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl > index 7228712..d61d2a2 100644 > --- a/tcl/JobDB-Executive.tcl > +++ b/tcl/JobDB-Executive.tcl > @@ -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 > } >