Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Nov 2012 10:42:34 +0000 (UTC)
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242889 - head/sys/dev/xen/netback
Message-ID:  <201211111042.qABAgYk4066339@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 
 
 /**



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211111042.qABAgYk4066339>