From: Amaury Denoyelle Date: Mon, 31 May 2021 12:26:20 +0000 (+0200) Subject: MINOR: errors: allow empty va_args for diag variadic macro X-Git-Tag: v2.5-dev1~201 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01b3c3d4fb634ddf12ae103719b77f965987f037;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/errors.h b/include/haproxy/errors.h index 4ece6e5556..a3614b7f0c 100644 --- a/include/haproxy/errors.h +++ b/include/haproxy/errors.h @@ -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) /*