From a9b16c2d66de5e4cda13c51b9a0c50964850a87c Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Wed, 22 Jul 2015 09:00:38 -0500 Subject: [PATCH] correct fallback err.h macro behavior --- include/compat/err.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/compat/err.h b/include/compat/err.h index af68a26..eaf7ccc 100644 --- a/include/compat/err.h +++ b/include/compat/err.h @@ -17,16 +17,16 @@ #include #define err(exitcode, format, ...) \ - errx(exitcode, format ": %s", __VA_ARGS__, strerror(errno)) + errx(exitcode, format ": %s", ## __VA_ARGS__, strerror(errno)) #define errx(exitcode, format, ...) \ - do { warnx(format, __VA_ARGS__); exit(exitcode); } while (0) + do { warnx(format, ## __VA_ARGS__); exit(exitcode); } while (0) #define warn(format, ...) \ - warnx(format ": %s", __VA_ARGS__, strerror(errno)) + warnx(format ": %s", ## __VA_ARGS__, strerror(errno)) #define warnx(format, ...) \ - fprintf(stderr, format "\n", __VA_ARGS__) + fprintf(stderr, format "\n", ## __VA_ARGS__) #endif