From: Christian Brauner Date: Thu, 4 Nov 2021 11:13:02 +0000 (+0100) Subject: test: improve logging helpers X-Git-Tag: lxc-5.0.0~54^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c7c983beee4b9dd1ae5e8937cbe3783a61462a3;p=thirdparty%2Flxc.git test: improve logging helpers Signed-off-by: Christian Brauner --- 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 { \