[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

bug in svn_string_strip_whitespace ?

From: Martin Furter <mf_at_rola.ch>
Date: 2003-10-07 21:36:01 CEST


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)

  /* 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 )

Is this a bug ?


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 7 21:37:48 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.