httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@covalent.net>
Subject Re: [PATCH] http2env optimization
Date Sat, 10 Nov 2001 18:46:53 GMT
On Saturday 10 November 2001 09:54 am, Brian Pane wrote:
> Ryan Bloom wrote:
> [...]
>
> >> {
> >>-    char *res = apr_pstrcat(a, "HTTP_", w, NULL);
> >>+    char *res = (char *)apr_palloc(a, 6 + strlen(w));
> >
> >Pleaes don't use a magic number 6.  Can we just make that strlen("HTTP_")
> > + 1, any compiler worth its salt will convert that at compile time.
>
> I prefer sizeof("HTTP_") because it gets evaluated at compile time
> even with gcc -O0.  This revised patch uses sizeof rather than strlen.

Committed.

Ryan

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Mime
View raw message