This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 3/3] Add test for thread names


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);

which at least my brain processes immediately like ARRAY_SIZE,
while with the * form, I have to stop and think.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]