From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5243 invoked by alias); 19 Jul 2012 17:24:47 -0000 Received: (qmail 5227 invoked by uid 22791); 19 Jul 2012 17:24:43 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Jul 2012 17:24:30 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6JHOUT7026821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 19 Jul 2012 13:24:30 -0400 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6JHOTOm028573 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 19 Jul 2012 13:24:29 -0400 From: Tom Tromey To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] sigall.exp and friends: centralize signals list. References: <20120719143526.8328.28449.stgit@brno.lan> Date: Thu, 19 Jul 2012 17:24:00 -0000 In-Reply-To: <20120719143526.8328.28449.stgit@brno.lan> (Pedro Alves's message of "Thu, 19 Jul 2012 15:35:26 +0100") Message-ID: <87zk6vy88i.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-07/txt/msg00362.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Pedro> +for {set i 0;} {$i < [llength $signals]} {incr i;} { Pedro> + # Skip the first. Pedro> + if { $i == 0 } { Pedro> + continue Pedro> + } Pedro> + Pedro> + set sig [lindex $signals $i] Pedro> + test_one_sig $sig Pedro> +} The ";"s aren't needed. They're only needed in Tcl if you write multiple statements on one line, but we don't do that anyhow, or shouldn't, since it is bad style. For the above I think it is more idiomatic in Tcl to write: foreach sig $signals { if {$sig == "ABRT"} { continue } test_one_sig $sig } That said, I don't care if you leave it as-is. Tom