g_virstor.h: macro parenthesization

Build with gcc -Wint-in-bool-context revealed a macro parenthesization
error (invoking LOG_MSG with a ternary expression for lvl).

Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	Dell EMC Isilon
Differential revision:	https://reviews.freebsd.org/D11411
This commit is contained in:
Ryan Libby 2017-06-30 22:01:18 +00:00
parent b73ac66839
commit fb0e3235ea
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=320511

View File

@ -48,8 +48,8 @@ struct virstor_map_entry {
#define LOG_MSG(lvl, ...) do { \
if (g_virstor_debug >= (lvl)) { \
printf("GEOM_" G_VIRSTOR_CLASS_NAME); \
if (lvl > 0) \
printf("[%u]", lvl); \
if ((lvl) > 0) \
printf("[%u]", (lvl)); \
printf(": "); \
printf(__VA_ARGS__); \
printf("\n"); \
@ -60,8 +60,8 @@ struct virstor_map_entry {
#define LOG_REQ(lvl, bp, ...) do { \
if (g_virstor_debug >= (lvl)) { \
printf("GEOM_" G_VIRSTOR_CLASS_NAME); \
if (lvl > 0) \
printf("[%u]", lvl); \
if ((lvl) > 0) \
printf("[%u]", (lvl)); \
printf(": "); \
printf(__VA_ARGS__); \
printf(" "); \