Date: Fri, 7 Nov 2014 15:45:35 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274235 - stable/10/sys/fs/autofs Message-ID: <201411071545.sA7FjZtc001636@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411071545.sA7FjZtc001636>