Re: [PATCH 3/4] dtrace-probe: Put semicolon after while on its own line

Pedro Alves
2017-06-21T21:36:18Z

On 06/21/2017 09:15 PM, Simon Marchi wrote:
> /* Use strtab_size as a sentinel. */
> - while (*p++ != '\0' && p - strtab < strtab_size);
> + while (*p++ != '\0' && p - strtab < strtab_size)
> + ; /* Silence clang's -Wempty-body warning. */

I'd must put the ; on its own line (there's probably something
in the coding conventions about this already), and without the
comment. It's quite common to write for/while loop like that,
see e.g.,:

$ grep "^[ |\t]*;[ |\t]*$" *.c -C 2

Sure the comment makes sense in the context of the patch,
but when reading the code without considering the patch's context,
it just looks like noise to me.

Thanks,
Pedro Alves