From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH 04/10] tcl/osstestlib.tcl: Provide lshift Date: Mon, 9 Feb 2015 13:51:53 +0000 Message-ID: <1423489913.4508.25.camel@citrix.com> References: <1423250275-20872-1-git-send-email-ian.jackson@eu.citrix.com> <1423250275-20872-5-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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YKokt-0008Nk-2d for xen-devel@lists.xenproject.org; Mon, 09 Feb 2015 13:52:03 +0000 In-Reply-To: <1423250275-20872-5-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 Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Fri, 2015-02-06 at 19:17 +0000, Ian Jackson wrote: > No callers yet. > > Signed-off-by: Ian Jackson > --- > tcl/osstestlib.tcl | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/tcl/osstestlib.tcl b/tcl/osstestlib.tcl > index 1531c87..a0413c4 100644 > --- a/tcl/osstestlib.tcl > +++ b/tcl/osstestlib.tcl > @@ -67,3 +67,10 @@ proc lremove {listvar item} { > if {$ix<0} return > set list [lreplace $list $ix $ix] > } > + > +proc lshift {listvar} { > + upvar 1 $listvar list > + set head [lindex $list 0] > + set list [lrange $list 1 end] You calculate but then throw away list here? Perhaps I need to read up on tcl scoping rules ;-) Anyway, with or without this last quoted line, whichever you intend: Acked-by: Ian Campbell