On Sunday 22 July 2001 13:46, G�nter Knauf wrote:
> Hi,
> here's a little cosmetic patch:
> with httpd-2.0 nonexistant SSI vars appear as '(none', the right bracket is
> missing.
>
> - tmp_buck = apr_bucket_immortal_create("(none)", sizeof("none"));
> + tmp_buck = apr_bucket_immortal_create("(none)", 6);
>
> as the string is hardcoded I've hardcoded the length too for speed.
I dislike hard-coding the length, because it makes it less obvious that we
are talking about the length of the string. Since we are using sizeof, and especially
since we have hard-coded the string in the sizeof, any decent compiler will optimize
this to the hard-coded value anyway, so the performance benefit really shouldn't
exist. I will fix the bug by just using sizeof("(none)") in the code and commit
today. Also, C++ comments can really mess up some C compilers. In the future, please
only use C style comments. Great catch!
Ryan
_____________________________________________________________________________
Ryan Bloom [EMAIL PROTECTED]
Covalent Technologies [EMAIL PROTECTED]
-----------------------------------------------------------------------------