]> granicus.if.org Git - spl/commitdiff
Add ASSERTV macro to simplify removing variables (the V in ASSERTV)
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 9 Jul 2009 19:15:23 +0000 (12:15 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 9 Jul 2009 19:15:23 +0000 (12:15 -0700)
which are only used in ASSERT().

include/sys/debug.h

index 12226a033ec875dfe6fc746bf9c2d6466d4a13e3..1ea1520deed820424666ad995d21449d7e2f3385 100644 (file)
@@ -218,6 +218,7 @@ struct page_collection {
 #define __ASSERT_TAGE_INVARIANT(x)     ((void)0)
 #define ASSERT(x)                      ((void)0)
 #define ASSERTF(x, y, z...)            ((void)0)
+#define ASSERTV(x)
 #define VERIFY(cond)                                                    \
 do {                                                                    \
         if (unlikely(!(cond))) {                                        \
@@ -348,6 +349,7 @@ do {                                                                    \
 #define ASSERT3U(x,y,z) VERIFY3U(x, y, z)
 #define ASSERT3P(x,y,z) VERIFY3P(x, y, z)
 
+#define ASSERTV(x)      x
 #define VERIFY(x)       ASSERT(x)
 
 #define __CDEBUG(cdls, subsys, mask, format, a...)                      \