httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <>
Subject Re: cvs commit: apache-2.0/mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c
Date Sat, 31 Jul 1999 18:23:19 GMT
>Imposing your preferred style on people without due process is
>incredibly lame. I hate comparing to NULL. NULL is FALSE. Everyone knows
>that (everyone with a clue, that is).

NULL isn't FALSE.  NULL is a macro that represents a nonexistant pointer.
The only reason it seems to be false is because, when evaluated within
an integer expression, it has the value of a long 0, which is also how
FALSE evaluates as an integer in C.  The warning exists because they are
two different types and an assignment statement, unlike an if expression,
isn't going to assume you wanted the type coerced to int unless you have
warnings disabled.

A person who reads code as if pointers are the same as ints just because
they have the same machine representation is going to screw up as soon as
they get to pointer arithmetic.  I don't care what style you use, so long
as you don't teach it to anyone else when I'm in the same room.


View raw message