svn commit: r242889 - head/sys/dev/xen/netback

Konstantin Belousov kostikbel at gmail.com
Sun Nov 11 19:49:50 UTC 2012


On Sun, Nov 11, 2012 at 10:42:34AM +0000, Roman Divacky wrote:
> Author: rdivacky
> Date: Sun Nov 11 10:42:34 2012
> New Revision: 242889
> URL: http://svnweb.freebsd.org/changeset/base/242889
> 
> Log:
>   Change the XNB_ASSERT from a statement expression to do-while(0) as its
>   result is never used.
> 
> Modified:
>   head/sys/dev/xen/netback/netback_unit_tests.c
> 
> Modified: head/sys/dev/xen/netback/netback_unit_tests.c
> ==============================================================================
> --- head/sys/dev/xen/netback/netback_unit_tests.c	Sun Nov 11 08:22:58 2012	(r242888)
> +++ head/sys/dev/xen/netback/netback_unit_tests.c	Sun Nov 11 10:42:34 2012	(r242889)
> @@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$");
>   * iff the assertion failed.  Note the implied parameters buffer and
>   * buflen
>   */
> -#define	XNB_ASSERT(cond) ({						\
> +#define	XNB_ASSERT(cond) do (						\
>  	int passed = (cond);						\
>  	char *_buffer = (buffer);					\
>  	size_t _buflen = (buflen);					\
> @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$");
>  		strlcat(_buffer, ":" TOSTRING(__LINE__) 		\
>  		  " Assertion Error: " #cond "\n", _buflen);		\
>  	}								\
> - ! passed; })
> +	} while (0)
>  
>  
>  /**
Look at r240747.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20121111/6219770d/attachment.sig>


More information about the svn-src-head mailing list