vfprintf typing problem

Carlos O'Donell carlos@systemhalted.org
Mon Apr 2 13:06:00 GMT 2012


On Mon, Apr 2, 2012 at 8:53 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> "Carlos O'Donell" <carlos@systemhalted.org> writes:
>
>> On Mon, Apr 2, 2012 at 7:09 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> David Miller <davem@davemloft.net> writes:
>>>
>>>> +    if (0 <= retval)
>>>           retval >= 0
>>
>> Why do you make this suggestion? Is this just so that the code follows
>> the existing style?
>
> It makes it unnecessarily hard to comprehend, against all mathematical
> style.

Thanks, that makes sense.

>> Placing the constant first has the benefit that it avoids accidental
>> assignment,
>
>>= is not an assignment.

But it might be in the future and that's what the practice tries to prevent.

Cheers,
Carlos.



More information about the Libc-alpha mailing list