From 01b3c3d4fb634ddf12ae103719b77f965987f037 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Mon, 31 May 2021 14:26:20 +0200 Subject: [PATCH] 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. --- include/haproxy/errors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/haproxy/errors.h b/include/haproxy/errors.h index 4ece6e555..a3614b7f0 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) /*