httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject Re: [PATCH] performance fix for mod_include
Date Sat, 10 Nov 2001 18:53:45 GMT
On Sat, 10 Nov 2001, Ryan Bloom wrote:

> > memset(f->ctx, 0, (size_t)((char *)&(ctx->error_str) - (char *)ctx));
> No offense, but that is an ugly line of code.  :-)

None taken... I never said it was pretty, just more correct.  :)

A prettier one looks like this:

memset(f->ctx, 0, APR_XtOffsetOf(include_ctx_t,error_str));


> I really think that error_str and time_str can just be removed from
> that structure.  That would allow us to not add the casts, and it
> would speed up that function.  I'll do that work sometime this week
> unless somebody beats me to it.

I totally agree that this is a better way to go.


   Cliff Woolley
   Charlottesville, VA

View raw message