httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo ...@perlig.de>
Subject Re: cvs commit: httpd-2.0/modules/filters mod_deflate.c
Date Sat, 17 Jul 2004 15:33:18 GMT
* niq@apache.org wrote:

>   +        f->ctx = ctx = (void*)-1;

I personally consider defining arbitrary pointer values as bad style, though
I'm not sure what the general opinion here is (if any).

I'd suggest to use a static pointer, like a global

static char foo_sentinel; /* choose a speaking name ;-) */
/* and later */
f->ctx = ctx = &foo_sentinel;

Additionally - afair - the use of arbirtrary pointer values can even lead
to bus errors on not-so-usual systems (loading undefined bits into an address
register...).

nd
-- 
die (eval q-qq[Just Another Perl Hacker
]
;-)
# André Malo, <http://www.perlig.de/> #

Mime
View raw message