diff options
author | glebius <glebius@FreeBSD.org> | 2005-02-25 10:49:47 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-02-25 10:49:47 +0000 |
commit | 159ca077867fd1ad769ea635c04714e4a8f398c4 (patch) | |
tree | 3f8af8d7ab41c75d3f229df5a163f556b664068a /sys/netinet | |
parent | 81aa83e78bd472fb7c89e7f8199e864a46da7e91 (diff) | |
download | FreeBSD-src-159ca077867fd1ad769ea635c04714e4a8f398c4.zip FreeBSD-src-159ca077867fd1ad769ea635c04714e4a8f398c4.tar.gz |
Embrace macros with do {} while (0)
Submitted by: maxim
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_carp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 0d543a6..a45f497 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -162,13 +162,15 @@ struct carp_if { #define CARP_LOCK(cif) mtx_lock(&(cif)->vhif_mtx) #define CARP_UNLOCK(cif) mtx_unlock(&(cif)->vhif_mtx) -#define CARP_LOG(...) \ +#define CARP_LOG(...) do { \ if (carp_opts[CARPCTL_LOG] > 0) \ log(LOG_INFO, __VA_ARGS__); \ +} while (0) -#define CARP_DEBUG(...) \ +#define CARP_DEBUG(...) do { \ if (carp_opts[CARPCTL_LOG] > 1) \ log(LOG_DEBUG, __VA_ARGS__); \ +} while (0) void carp_hmac_prepare(struct carp_softc *); void carp_hmac_generate(struct carp_softc *, u_int32_t *, |