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

Re: svn commit: r33104 - in trunk/subversion: include libsvn_subr libsvn_wc

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 16 Sep 2008 12:32:35 -0700

On Tue, Sep 16, 2008 at 12:22 PM, <stsp_at_tigris.org> wrote:
>...
\> +++ trunk/subversion/libsvn_subr/svn_string.c Tue Sep 16 12:22:13
2008 (r33104)
> @@ -417,6 +417,16 @@ svn_stringbuf_appendcstr(svn_stringbuf_t
> }
>
>
> +void
> +svn_stringbuf_appendchar(svn_stringbuf_t *targetstr,
> + char c)
> +{
> + char s[2];
> +
> + s[0] = c;
> + s[1] = '\0';
> + svn_stringbuf_appendbytes(targetstr, s, 1);
> +}

That seems more complicated than it needs to be. appendbytes() won't
look at any bytes past the given length. The above can be wriiten more
simply as:

{
  svn_stringbuf_appendbytes(targetstr, &c, 1);
}

Cheers,
-g

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-16 21:32:57 CEST

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.