Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 May 2013 23:28:28 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r250816 - head/sys/sys
Message-ID:  <201305192328.r4JNSSHM091078@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Sun May 19 23:28:28 2013
New Revision: 250816
URL: http://svnweb.freebsd.org/changeset/base/250816

Log:
  Protect SDT_PROBE() with do { } while (0) loop.

Modified:
  head/sys/sys/sdt.h

Modified: head/sys/sys/sdt.h
==============================================================================
--- head/sys/sys/sdt.h	Sun May 19 19:42:46 2013	(r250815)
+++ head/sys/sys/sdt.h	Sun May 19 23:28:28 2013	(r250816)
@@ -184,11 +184,12 @@ struct sdt_provider {
 #define SDT_PROBE_DECLARE(prov, mod, func, name)				\
 	extern struct sdt_probe sdt_##prov##_##mod##_##func##_##name[1]
 
-#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)		\
+#define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)	do {	\
 	if (sdt_##prov##_##mod##_##func##_##name->id)				\
 		(*sdt_probe_func)(sdt_##prov##_##mod##_##func##_##name->id,	\
 		    (uintptr_t) arg0, (uintptr_t) arg1, (uintptr_t) arg2,	\
-		    (uintptr_t) arg3, (uintptr_t) arg4)
+		    (uintptr_t) arg3, (uintptr_t) arg4);			\
+} while (0)
 
 #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type)			\
 	static struct sdt_argtype sdt_##prov##_##mod##_##func##_##name##num[1]	\



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