aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/compat/err.h8
1 files 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 @@
17#include <string.h> 17#include <string.h>
18 18
19#define err(exitcode, format, ...) \ 19#define err(exitcode, format, ...) \
20 errx(exitcode, format ": %s", __VA_ARGS__, strerror(errno)) 20 errx(exitcode, format ": %s", ## __VA_ARGS__, strerror(errno))
21 21
22#define errx(exitcode, format, ...) \ 22#define errx(exitcode, format, ...) \
23 do { warnx(format, __VA_ARGS__); exit(exitcode); } while (0) 23 do { warnx(format, ## __VA_ARGS__); exit(exitcode); } while (0)
24 24
25#define warn(format, ...) \ 25#define warn(format, ...) \
26 warnx(format ": %s", __VA_ARGS__, strerror(errno)) 26 warnx(format ": %s", ## __VA_ARGS__, strerror(errno))
27 27
28#define warnx(format, ...) \ 28#define warnx(format, ...) \
29 fprintf(stderr, format "\n", __VA_ARGS__) 29 fprintf(stderr, format "\n", ## __VA_ARGS__)
30 30
31#endif 31#endif
32 32