summaryrefslogtreecommitdiff
path: root/libgcompat
diff options
context:
space:
mode:
authorElizabeth Myers <elizabeth@interlinked.me>2018-04-03 01:47:16 -0500
committerElizabeth Myers <elizabeth@interlinked.me>2018-04-03 01:47:16 -0500
commitdb8ea1459e3f2701817740697e2faab95b254d7e (patch)
treeb0dd74d7427ccea5ac3d1a250a1cb77ebf1944d5 /libgcompat
parent4b2a0e3ac4f76c8448d6e9a850af4ffca4d911b8 (diff)
downloadgcompat-db8ea1459e3f2701817740697e2faab95b254d7e.tar.gz
gcompat-db8ea1459e3f2701817740697e2faab95b254d7e.tar.bz2
gcompat-db8ea1459e3f2701817740697e2faab95b254d7e.tar.xz
gcompat-db8ea1459e3f2701817740697e2faab95b254d7e.zip
GCOMPAT__assert_with_reason: omit format parameter
__VA_ARGS__ expects one or more arguments; this is a cheesy hack to allow passing only a format string (which is often all you need for small asserts).
Diffstat (limited to 'libgcompat')
-rw-r--r--libgcompat/internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgcompat/internal.h b/libgcompat/internal.h
index bb107bc..3b08271 100644
--- a/libgcompat/internal.h
+++ b/libgcompat/internal.h
@@ -3,10 +3,10 @@
void GCOMPAT__panic(const char *fmt, ...) __attribute__((noreturn));
-#define GCOMPAT__assert_with_reason(chk, fmt, ...) \
+#define GCOMPAT__assert_with_reason(chk, ...) \
do { \
if (!(chk)) { \
- GCOMPAT__panic(fmt, __VA_ARGS__); \
+ GCOMPAT__panic(__VA_ARGS__); \
} \
} \
while(0);