[U-Boot-Users] [PATCH V2] Fix Ethernet init() return codes.
Wolfgang Denk
wd at denx.de
Wed Jan 9 23:01:17 CET 2008
In message <014701c852ed$4b0c4040$6103170a at atmel.com> you wrote:
>
> Why not use symbolic return values?
Because then nobody knows what the symbols mean.
> "return SUCCESS;" seems much more appropriate than
> "return 0;" or "return -1;"
These constants are unmistakeable for anyone who ever wrote a program
under any Unix system...
> if(myfunction() == SUCCESS) {
>
> }
>
> is much more clear than
>
> if(myfunction()) {
>
> }
Not to me. The former needs a lookup of the define, the latter is
obvious.
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 at denx.de
Es gibt immer genug fuer die Beduerfnisse aller, aber niemals genug
fuer die Gier einzelner. -- Ghandi
More information about the U-Boot
mailing list