Date: Fri, 3 Oct 2014 10:18:23 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272471 - head/sys/fs/autofs Message-ID: <201410031018.s93AIN1A079636@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410031018.s93AIN1A079636>