| Message view | « Date » · « Thread » |
|---|---|
| Top | « Date » · « Thread » |
| From | Brian Pane <bp...@pacbell.net> |
| Subject | Re: [PATCH] http2env optimization |
| Date | Sat, 10 Nov 2001 17:54:40 GMT |
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.
--Brian
| |
| Mime |
|
| View raw message | |