Re: [PATCH] Fix thinkos in #if -> #ifdef conversions

From: Valdis . Kletnieks
Date: Tue Apr 27 2004 - 15:07:14 EST


On Tue, 27 Apr 2004 12:24:09 PDT, Tom Rini <trini@xxxxxxxxxxxxxxxxxxx> said:
> <donning brown paper bag>
> When I changed some '#if FOO' tests to '#ifdef FOO' I forgot to make
> sure that nothing was doing #define FOO 0. So after auditing all of the
> changes I made, the following is needed:

You're not the first to do that - I stayed away from preprocessor variables
other than CONFIG_* when I chunked through a big #if/#ifdef cleanup a few
months ago, simply because my poor brain was too tiny to figure out what was
intended.

Oddly enough, all the abuses I gave up on trying to figure out were
of the form '#if FOO_DEBUG > N', while the non-debugging comparisons
in a #if were all fairly clear. That says something about kernel programmers,
but I'm not sure what.. :)

Attachment: pgp00000.pgp
Description: PGP signature