
5 Jul
2009
5 Jul
'09
1:30 a.m.
Dear Anatolij & Matthias,
in message 4A4C7D73.1080502@denx.de you wrote:
if(0 == bpp){
if (bpp == 0) {
The spaces are OK but why turn around the comparison? I always use
Because "0 == bpp" is ugly.
this style to prevent from unwanted assignments. Well, GCC warns about assignments in ifs and as u-boot is GCC only I can do that.
it is a matter of personal preference. "if (0 == bpp) {" is OK for me, too.
NAK for me. Matthias, please do as Anatolij suggested.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
If a packet hits a pocket on a socket on a port,
And the bus is interrupted as a very last resort,
And the address of the memory makes your floppy disk abort,
Then the socket packet pocket has an error to report! - Ken Burchill?