On Sun, 22 Jul 2001, Ryan Bloom wrote:
> 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.
Agreed.
> 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!
Shouldn't it be (sizeof("(none)") - 1)? It's the length of the data
itself that we care about here, not counting the null terminator.
[sizeof("(none)") == 7, right?]
--Cliff
--------------------------------------------------------------
Cliff Woolley
[EMAIL PROTECTED]
Charlottesville, VA