This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: vfprintf typing problem


"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.

> Placing the constant first has the benefit that it avoids accidental
> assignment,

>= is not an assignment.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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