dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Read errors

Re: Read errors

From: Linus Nielsen Feltzing <>
Date: Fri, 14 Mar 2003 10:59:16 +0100

Henrik Backe wrote:
>>I don't see the difference. The if(func()) and the if(0 != func()) are
>>the same thing, and I prefer the first one, because there is less fluff.
>>The only issue is the "polarity" of the return code.
> The only difference between them is that one contains hidden magic.

Magic? Not at all. C is not magic. The if(func()) construct is a de
facto standard in the C language. Look around you, this is how C is
written, like it or not. I prefer C code that is written like that,
because then it looks like any other C code.

If you write it differently, the C programmer has to look twice to see
what the programmer has intended to do, since the construct is not the
usual one. Constructs like if(0 != func()) catches my eye and leads me
to thing "uh uh, this looks fishy, what is he trying to do?".

Received on 2003-03-14

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy