You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2012/04/24 17:50:08 UTC

Re: svn commit: r1329778 - /subversion/trunk/subversion/libsvn_subr/string.c

On Apr 24, 2012 11:19 AM, <da...@apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_subr/string.c Tue Apr 24 15:19:19
2012
> @@ -942,8 +942,10 @@ static const char decimal_table[100][4]
>       *(apr_uint16_t*)(dest) = *(apr_uint16_t*)(source);
>  #else
>  #  define COPY_TWO_BYTES(dest,source) \
> +    do { \
>       (dest)[0] = (source)[0]; \
> -      (dest)[1] = (source)[1];
> +      (dest)[1] = (source)[1]; \
> +    while (0)
>  #endif

Is that one of the performance-sensitive things Stefan^2 worked on? If so,
then I wonder if compilers will always be able to strip the do/while. Maybe
instead:

((dest)[0] = (source)[0], (dest)[1] = (source)[1])

That shouldn't trip up any compilers.

Cheers,
-g