Re: [PATCH] tsearch.3: Simplify type usage and remove unneeded casts

Alejandro Colomar
2020-09-05T15:41:33Z

Hi Michael,

On 9/5/20 5:35 PM, Michael Kerrisk (man-pages) wrote:
> By chance, I've just made a conflicting change, but also...

I noticed while rebasing, and was already preparing the fix :)

>> - int i, *ptr;
>> - void *val;
>> + int i, *ptr, **val;
>
> Not quite your fault, since you followed an already poor example,
> but many people (and I am one of them) frown on declarations lines
> such as the above: 'int', 'int *' and 'int **' are three different
> types, and it's considered bad form to declare variables with
> different type in one source line. (It's very easy to overlook
> an asterisk or two when scanning the source.) Better is:
>
> int i
> int *ptr;
> int **val;

Agree. I also do that in my code, but was following the existing
practice.

> Could you please recraft this patch against current Git, which
> changed in the last minutes...

Sure.

Regards,
Alex.