m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'util.h')
-rw-r--r--util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/util.h b/util.h
index 8c56f67..a5606ad 100644
--- a/util.h
+++ b/util.h
@@ -17,4 +17,12 @@
} \
})
+#define ORFAIL_NULL(ptr, error, label) \
+({ \
+ if (ptr == NULL) { \
+ err = error; \
+ goto label; \
+ } \
+})
+
#endif