This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH v2 3/3] Add test for thread names
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Date: Thu, 26 Nov 2015 16:57:21 +0000
- Subject: Re: [PATCH v2 3/3] Add test for thread names
- Authentication-results: sourceware.org; auth=none
- References: <1448488138-2360-1-git-send-email-simon dot marchi at ericsson dot com> <1448488138-2360-4-git-send-email-simon dot marchi at ericsson dot com> <5656F0C2 dot 4070203 at redhat dot com> <56572C7F dot 3030101 at ericsson dot com>
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) * NUM_THREADS);
BTW, the standard pattern would be:
assert (sizeof (names) / sizeof (names) == NUM_THREADS);
which at least my brain processes immediately like ARRAY_SIZE,
while with the * form, I have to stop and think.