From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH V2] Fix Ethernet init() return codes.
Date: Wed, 09 Jan 2008 23:01:17 +0100 [thread overview]
Message-ID: <20080109220117.80CA424755@gemini.denx.de> (raw)
In-Reply-To: Your message of "Wed, 09 Jan 2008 19:26:08 +0100." <014701c852ed$4b0c4040$6103170a@atmel.com>
In message <014701c852ed$4b0c4040$6103170a@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
next prev parent reply other threads:[~2008-01-09 22:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 22:23 [U-Boot-Users] [PATCH V2] Fix Ethernet init() return codes Ben Warren
2008-01-09 4:58 ` Stefan Roese
2008-01-09 15:18 ` Kim Phillips
2008-01-09 14:56 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 17:01 ` Ben Warren
2008-01-09 21:30 ` Wolfgang Denk
2008-01-09 21:37 ` Ben Warren
2008-01-09 21:50 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 22:19 ` Ben Warren
2008-01-09 22:43 ` Wolfgang Denk
2008-01-09 22:48 ` Ben Warren
2008-01-09 16:14 ` Timur Tabi
2008-01-09 16:26 ` Haavard Skinnemoen
2008-01-09 18:26 ` Ulf Samuelsson
2008-01-09 22:01 ` Wolfgang Denk [this message]
2008-01-10 0:11 ` Ulf Samuelsson
2008-01-10 8:01 ` Haavard Skinnemoen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080109220117.80CA424755@gemini.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox