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

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

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 4 Jun 2012 12:43:19 -0400

On Jun 4, 2012 10:46 AM, <blair_at_apache.org> wrote:
>
> Author: blair
> Date: Mon Jun 4 14:46:16 2012
> New Revision: 1345993
>
> URL: http://svn.apache.org/viewvc?rev=1345993&view=rev
> Log:
> Follow up to r1345883; protect macro arguments.
>
> * subversion/libsvn_subr/string.c
> (COPY_TWO_BYTES):
> Wrap the two macro arguments in ().
>
> Modified:
> subversion/trunk/subversion/libsvn_subr/string.c
>
> Modified: subversion/trunk/subversion/libsvn_subr/string.c
> URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/string.c?rev=1345993&r1=1345992&r2=1345993&view=diff
>
==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/string.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/string.c Mon Jun 4 14:46:16
2012
> @@ -938,7 +938,7 @@ static const char decimal_table[100][4]
>
> /* Copy the two bytes at SOURCE[0] and SOURCE[1] to DEST[0] and DEST[1]
*/
> #define COPY_TWO_BYTES(dest,source)\
> - memcpy(dest, source, 2)
> + memcpy((dest), (source), 2)

Actually, this is not necessary since these are args in the macro. They
cannot be comma-expression values.

Cheers,
-g
Received on 2012-06-04 18:43:52 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.