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 00:20:41 GMT
>  -    one_process = getenv("ONE_PROCESS");
>  +    one_process = !!getenv("ONE_PROCESS");

Just for the record, any style that preserves characters at the cost
of making the code unreadable is incredibly lame.  The right way to
code it so that others know what you meant is

        one_process = (getenv("ONE_PROCESS") != NULL);

Forcing the code reader to perform mental gymnastics just to figure out
the value of what is otherwise an obvious boolean expression will just
cause you to be cursed by those who maintain your code.

Obfuscated C is for wankers who code in the closet.


View raw message