diff options
author | trasz <trasz@FreeBSD.org> | 2014-11-07 15:45:34 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2014-11-07 15:45:34 +0000 |
commit | f72fde1ec0f21680f8aea663d9c35f9df8d5bbd4 (patch) | |
tree | 2e14da2358816ea0b41cc9deb397d89d4657bcd7 /sys/fs | |
parent | 603b73d3cc45737c0d3864cbc5d016ee07c2f3da (diff) | |
download | FreeBSD-src-f72fde1ec0f21680f8aea663d9c35f9df8d5bbd4.zip FreeBSD-src-f72fde1ec0f21680f8aea663d9c35f9df8d5bbd4.tar.gz |
MFC r272471:
Fix autofs debug macros.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/autofs/autofs.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/fs/autofs/autofs.h b/sys/fs/autofs/autofs.h index 1298a46..0713307 100644 --- a/sys/fs/autofs/autofs.h +++ b/sys/fs/autofs/autofs.h @@ -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) |