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)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to