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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux