linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* gratuitous complexity
@ 2001-11-27 12:02 Paul Mackerras
  2001-11-27 19:13 ` Mark A. Greer
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Mackerras @ 2001-11-27 12:02 UTC (permalink / raw)
  To: linuxppc-dev


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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-11-27 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-27 12:02 gratuitous complexity Paul Mackerras
2001-11-27 19:13 ` Mark A. Greer

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).