summaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'main.h')
-rw-r--r--main.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/main.h b/main.h
index ccd7221..9759ecf 100644
--- a/main.h
+++ b/main.h
@@ -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)) { \