svn commit: r274235 - stable/10/sys/fs/autofs

Edward Tomasz Napierala trasz at FreeBSD.org
Fri Nov 7 15:45:35 UTC 2014


Author: trasz
Date: Fri Nov  7 15:45:34 2014
New Revision: 274235
URL: https://svnweb.freebsd.org/changeset/base/274235

Log:
  MFC r272471:
  
  Fix autofs debug macros.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/fs/autofs/autofs.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/autofs/autofs.h
==============================================================================
--- stable/10/sys/fs/autofs/autofs.h	Fri Nov  7 15:44:03 2014	(r274234)
+++ stable/10/sys/fs/autofs/autofs.h	Fri Nov  7 15:45:34 2014	(r274235)
@@ -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-stable-10 mailing list