From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Make TFTP Quiet
Date: Wed, 12 Aug 2009 12:02:33 +0200 [thread overview]
Message-ID: <m2hbwdqrie.fsf@ohwell.denx.de> (raw)
In-Reply-To: <ed82fe3e0908101355m39753624x1697eea08995df20@mail.gmail.com> (Timur Tabi's message of "Mon, 10 Aug 2009 15:55:20 -0500")
Hi Timur,
>> +#ifdef CONFIG_TFTP_QUIET
>> +#define puts_quiet(fmt)
>> +#else
>> +#define puts_quiet(fmt) ? ? ? ? ? ? ? ?puts(fmt);
>> +#endif
>
> This looks backwards to me. I would do this:
>
> #ifdef CONFIG_TFTP_QUIET
> #define puts(x) puts_quiet(x)
> #endif
>
> That way, you don't need to change all of the puts calls to
> puts_quiet. Plus, having the normal calls be "puts_quiet" that
> changes to puts when QUIET is *not* enabled just feels wrong.
Just as a general remark - I consider it a bad idea to "overload" well
known functions with non-standard behaviour. This breaks the "principle
of least surprise" which turns out to be very valuable.
Cheers
Detlev
--
It was actually a very beautiful thing to see a sunrise, cause' that's
such a calm time of day. It's a wonderful time of day to get ready to
go to bed.
-- Richard M. Stallman
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
next prev parent reply other threads:[~2009-08-12 10:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 20:26 [U-Boot] [PATCH] Make TFTP Quiet Robin Getz
2009-08-10 20:55 ` Timur Tabi
2009-08-10 23:33 ` Scott Wood
2009-08-11 1:10 ` Robin Getz
2009-08-12 10:02 ` Detlev Zundel [this message]
2009-08-12 19:48 ` Scott Wood
2009-08-12 20:06 ` Robin Getz
2009-08-13 11:32 ` Detlev Zundel
2009-08-13 4:01 ` Mike Frysinger
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=m2hbwdqrie.fsf@ohwell.denx.de \
--to=dzu@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