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 [EMAIL PROTECTED]
Covalent Technologies [EMAIL PROTECTED]
--------------------------------------------------------------