Martin Furter <mf@rola.ch> writes:
> I'm not sure if it's supposed to be this way but
> svn_string_strip_whitespace does not strip any spaces when the string
> only contains spaces.
>
> subversion/libsvn_subr/svn_string.c lines 188 - 195:
> apr_size_t offset = svn_string_first_non_whitespace (str);
>
> if (offset == str->len)
> return;
>
> /* Go ahead! Waste some RAM, we've got pools! :) */
> str->data += offset;
> str->len -= offset;
>
> I'd have expected that it would look like this:
> apr_size_t offset = svn_string_first_non_whitespace (str);
>
> str->data += offset;
> str->len -= offset;
> if (str->len == 0 )
> return;
>
> Is this a bug ?
I think it's a bug. The doc string implies that it should reduce such
a string to 0 length. Want to fix?
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 8 21:19:29 2003