From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 129127 invoked by alias); 26 Nov 2015 18:21:41 -0000 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 Received: (qmail 129109 invoked by uid 89); 26 Nov 2015 18:21:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: usplmg21.ericsson.net Received: from usplmg21.ericsson.net (HELO usplmg21.ericsson.net) (198.24.6.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 26 Nov 2015 18:21:39 +0000 Received: from EUSAAHC005.ericsson.se (Unknown_Domain [147.117.188.87]) by usplmg21.ericsson.net (Symantec Mail Security) with SMTP id A7.59.32102.0BD47565; Thu, 26 Nov 2015 19:21:36 +0100 (CET) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.89) with Microsoft SMTP Server id 14.3.248.2; Thu, 26 Nov 2015 13:21:37 -0500 Subject: Re: [PATCH v2 3/3] Add test for thread names To: Pedro Alves , References: <1448488138-2360-1-git-send-email-simon.marchi@ericsson.com> <1448488138-2360-4-git-send-email-simon.marchi@ericsson.com> <5656F0C2.4070203@redhat.com> <56572C7F.3030101@ericsson.com> <565739F1.2010005@redhat.com> From: Simon Marchi Message-ID: <56574DB1.4070301@ericsson.com> Date: Thu, 26 Nov 2015 18:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <565739F1.2010005@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00577.txt.bz2 On 15-11-26 11:57 AM, Pedro Alves wrote: > On 11/26/2015 03:59 PM, Simon Marchi wrote: > >> I modified names.c significantly, so could you give it another quick look? > > Looks great, thanks. > >> + /* Make sure that NAMES contains NUM_THREADS elements. */ >> + assert (sizeof (names) == sizeof (names[0]) * NUM_THREADS); > > BTW, the standard pattern would be: > > assert (sizeof (names) / sizeof (names[0]) == NUM_THREADS); You are right, it's better like that. > which at least my brain processes immediately like ARRAY_SIZE, > while with the * form, I have to stop and think. > > Thanks, > Pedro Alves Pushed, thanks!