aboutsummaryrefslogtreecommitdiff
path: root/src/util_ct.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util_ct.h')
-rw-r--r--src/util_ct.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util_ct.h b/src/util_ct.h
index ad8118f..a199b19 100644
--- a/src/util_ct.h
+++ b/src/util_ct.h
@@ -8,6 +8,7 @@
#endif
#define PRNE_LIMIT_ENUM(t,x,l) _Static_assert((x) <= (l),"enum overflow: "#t)
+#define prne_static_assert(expr, msg) _Static_assert((expr), msg)
#define prne_op_min(a, b) ((a) < (b) ? (a) : (b))
#define prne_op_max(a, b) ((a) > (b) ? (a) : (b))
@@ -42,3 +43,8 @@
#define prne_dbgmast(expr, ...)
#define prne_dbgtrap(expr) (expr)
#endif
+
+#define prne_chk_assign(l, r) \
+ if ((l) != NULL) {\
+ *(l) = (r);\
+ }