From: Paul Mackerras <paulus@samba.org>
To: linuxppc-dev@lists.linuxppc.org
Subject: gratuitous complexity
Date: Tue, 27 Nov 2001 23:02:57 +1100 (EST) [thread overview]
Message-ID: <15363.33009.545085.87868@gargle.gargle.HOWL> (raw)
I was innocently browsing through include/asm-ppc/gt64260.h when I
came across this:
#ifndef TRUE
#define TRUE (0 == 0)
#endif
#ifndef FALSE
#define FALSE (0 != 0)
#endif
I nearly lost my dinner! It's just not fair to spring something that
awful on people without at least a warning for those with weak
stomachs. :)
Seriously though, it is unnecessarily complex. If you want to use TRUE
and FALSE, define them as 1 and 0. The C language standard specifies
that 0 is false and anything non-zero is true.
I also wonder why we need so many functions to access the gt64260 -
there are 19 different functions of the form gt64250*_set_*, which
seems completely over the top to me. How many of them actually get
used?
Paul.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next reply other threads:[~2001-11-27 12:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-27 12:02 Paul Mackerras [this message]
2001-11-27 19:13 ` gratuitous complexity Mark A. Greer
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=15363.33009.545085.87868@gargle.gargle.HOWL \
--to=paulus@samba.org \
--cc=linuxppc-dev@lists.linuxppc.org \
/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;
as well as URLs for NNTP newsgroup(s).