svn commit: r272471 - head/sys/fs/autofs

Edward Tomasz Napierala trasz at FreeBSD.org
Fri Oct 3 10:18:23 UTC 2014


Author: trasz
Date: Fri Oct  3 10:18:22 2014
New Revision: 272471
URL: https://svnweb.freebsd.org/changeset/base/272471

Log:
  Fix autofs debug macros.
  
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/fs/autofs/autofs.h

Modified: head/sys/fs/autofs/autofs.h
==============================================================================
--- head/sys/fs/autofs/autofs.h	Fri Oct  3 09:58:05 2014	(r272470)
+++ head/sys/fs/autofs/autofs.h	Fri Oct  3 10:18:22 2014	(r272471)
@@ -42,15 +42,18 @@ extern uma_zone_t autofs_node_zone;
 extern int autofs_debug;
 extern int autofs_mount_on_stat;
 
-#define	AUTOFS_DEBUG(X, ...)					\
-	if (autofs_debug > 1) {					\
-		printf("%s: " X "\n", __func__, ## __VA_ARGS__);\
+#define	AUTOFS_DEBUG(X, ...)						\
+	do {								\
+		if (autofs_debug > 1)					\
+			printf("%s: " X "\n", __func__, ## __VA_ARGS__);\
 	} while (0)
 
-#define	AUTOFS_WARN(X, ...)					\
-	if (autofs_debug > 0) {					\
-		printf("WARNING: %s: " X "\n",			\
-		    __func__, ## __VA_ARGS__);			\
+#define	AUTOFS_WARN(X, ...)						\
+	do {								\
+		if (autofs_debug > 0) {					\
+			printf("WARNING: %s: " X "\n",			\
+		    	    __func__, ## __VA_ARGS__);			\
+		}							\
 	} while (0)
 
 #define AUTOFS_SLOCK(X)		sx_slock(&X->am_lock)


More information about the svn-src-head mailing list