[zaptel-commits] trunk r1135 - /trunk/xpp/zap_debug.h

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Tue Jun 20 04:24:10 MST 2006


Author: kpfleming
Date: Tue Jun 20 06:24:10 2006
New Revision: 1135

URL: http://svn.digium.com/view/zaptel?rev=1135&view=rev
Log:
turn an expression into a statement so the compiler won't complain about unused expression results

Modified:
    trunk/xpp/zap_debug.h

Modified: trunk/xpp/zap_debug.h
URL: http://svn.digium.com/view/zaptel/trunk/xpp/zap_debug.h?rev=1135&r1=1134&r2=1135&view=diff
==============================================================================
--- trunk/xpp/zap_debug.h (original)
+++ trunk/xpp/zap_debug.h Tue Jun 20 06:24:10 2006
@@ -23,9 +23,11 @@
  */
 
 /* Debugging Macros */
-#define	DBG(fmt, ...)	\
-	((print_dbg) && printk(KERN_DEBUG "DBG-%s: %s: " fmt, \
-		THIS_MODULE->name, __FUNCTION__, ## __VA_ARGS__))
+#define	DBG(fmt, ...) \
+	do {					\
+		if (print_dbg)			\
+			printk(KERN_DEBUG "DBG-%s: %s: " fmt, THIS_MODULE->name, __FUNCTION__, ## __VA_ARGS__); \
+	} while (0)
 #define	INFO(fmt, ...)	printk(KERN_INFO "INFO-%s: " fmt, THIS_MODULE->name, ## __VA_ARGS__)
 #define	NOTICE(fmt, ...)	printk(KERN_NOTICE "NOTICE-%s: " fmt, THIS_MODULE->name, ## __VA_ARGS__)
 #define	WARN(fmt, ...)	printk(KERN_WARNING "WARN-%s: %s: " fmt, THIS_MODULE->name, __FUNCTION__, ## __VA_ARGS__)



More information about the zaptel-commits mailing list