[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [OSSTEST PATCH 04/10] tcl/osstestlib.tcl: Provide lshift



On Fri, 2015-02-06 at 19:17 +0000, Ian Jackson wrote:
> No callers yet.
> 
> Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> ---
>  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 <ian.campbell@xxxxxxxxxx>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.