smatch: create a local_debug() macro
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 28 Jan 2013 06:22:00 +0000 (28 09:22 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 28 Jan 2013 06:22:00 +0000 (28 09:22 +0300)
It's like sm_msg() but only if you have local_debug turned on.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch.h

index f2190ca..c0d1253 100644 (file)
--- a/smatch.h
+++ b/smatch.h
@@ -170,6 +170,12 @@ do {                                                           \
         sm_printf("\n");                                       \
 } while (0)
 
+#define local_debug(msg...)                                    \
+do {                                                           \
+       if (local_debug)                                        \
+               sm_msg(msg);                                    \
+} while (0)
+
 extern char *implied_debug_msg;
 static inline void print_implied_debug_msg()
 {