diff options
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -73,6 +73,18 @@ void __die(const char *fmt, ...) __attribute__((format(printf, 1, 2))); return __VA_ARGS__; \ } while (0) +#define assert_return_silent(expr, ...) \ + do { \ + if (!(expr)) \ + return __VA_ARGS__; \ + } while (0) + +#define assert_die(expr, msg) \ + do { \ + if (!assert_log(expr, #expr)) \ + die(msg); \ + } while (0) + #define assert_task_alive_or(lvl, t, cmd) \ do { \ if (!(t)) { \ |