httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r365376 - /httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c
Date Tue, 03 Jan 2006 14:38:43 GMT
Garrett Rooney wrote:
> 
> On 1/2/06, jim@apache.org <jim@apache.org> wrote:
> > Author: jim
> > Date: Mon Jan  2 08:52:58 2006
> > New Revision: 365376
> >
> > URL: http://svn.apache.org/viewcvs?rev=3D365376&view=3Drev
> > Log:
> > Avoid magic numbers. Since we are reading the header, let's
> > be explicit about it. Also removes the need to clean up
> > the readbuf again, and any potential for confusion on
> > what we are doing ;)
> 
> Um, doesn't this assume that there's no padding in the compiler's
> layout of the struct?  Is that safe to do?  I've always been under the
> impression that relying on such things is not portable.  If nothing
> else we should probably have a compile time check that it's size =3D=3D 8,
> or something...
> 

I'm fine with removing the use of sizeof and sticking with '8', since
it's a defined value in the FCGI protocol itself. But we use sizeof
header in loads of other places there as well...

-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
	    "If you can dodge a wrench, you can dodge a ball."

Mime
View raw message