diff options
author | Elizabeth Myers <elizabeth@interlinked.me> | 2018-04-03 01:47:16 -0500 |
---|---|---|
committer | Elizabeth Myers <elizabeth@interlinked.me> | 2018-04-03 01:47:16 -0500 |
commit | db8ea1459e3f2701817740697e2faab95b254d7e (patch) | |
tree | b0dd74d7427ccea5ac3d1a250a1cb77ebf1944d5 | |
parent | 4b2a0e3ac4f76c8448d6e9a850af4ffca4d911b8 (diff) | |
download | gcompat-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).
-rw-r--r-- | libgcompat/internal.h | 4 |
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); |