From 2c7c983beee4b9dd1ae5e8937cbe3783a61462a3 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 4 Nov 2021 12:13:02 +0100 Subject: [PATCH] test: improve logging helpers Signed-off-by: Christian Brauner --- src/tests/lxctest.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/lxctest.h b/src/tests/lxctest.h index e63936d5f..fda2821e6 100644 --- a/src/tests/lxctest.h +++ b/src/tests/lxctest.h @@ -30,14 +30,14 @@ #include #include -#define lxc_debug_stream(stream, format, ...) \ - do { \ - fprintf(stream, "%s: %d: %s: " format "\n", __FILE__, __LINE__, \ - __func__, __VA_ARGS__); \ +#define lxc_debug_stream(stream, format, ...) \ + do { \ + fprintf(stream, "%s: %d: %s: " format "\n", __FILE__, \ + __LINE__, __func__, ##__VA_ARGS__); \ } while (false) -#define lxc_error(format, ...) lxc_debug_stream(stderr, format, __VA_ARGS__) -#define lxc_debug(format, ...) lxc_debug_stream(stdout, format, __VA_ARGS__) +#define lxc_error(format, ...) lxc_debug_stream(stderr, format, ##__VA_ARGS__) +#define lxc_debug(format, ...) lxc_debug_stream(stdout, format, ##__VA_ARGS__) #define lxc_test_assert_stringify(expression, stringify_expression) \ do { \ -- 2.39.2