MINOR: errors: allow empty va_args for diag variadic macro

Use the '##' operator to allow the usage of HA_DIAG_WARNING_COND macro
without extra arguments.

This must be backported up to 2.4.
This commit is contained in:
Amaury Denoyelle 2021-05-31 14:26:20 +02:00
parent 64d6c09e54
commit 01b3c3d4fb

View File

@ -88,7 +88,7 @@ void ha_diag_warning(const char *fmt, ...)
#define HA_DIAG_WARNING_COND(cond, fmt, ...) \
do { \
if ((global.mode & MODE_DIAG) && (cond)) \
_ha_diag_warning((fmt), __VA_ARGS__); \
_ha_diag_warning((fmt), ##__VA_ARGS__); \
} while (0)
/*