aboutsummaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/log.h b/src/log.h
index 2e8167b..d3cf6f1 100644
--- a/src/log.h
+++ b/src/log.h
@@ -33,4 +33,14 @@ error(const char *format, ...)
exit(EXIT_FAILURE);
}
+static inline void
+require(const char *format, ...)
+{
+ va_list args;
+ va_start(args, format);
+ vfprintf(stderr, format, args);
+ va_end(args);
+ exit(EXIT_SUCCESS);
+}
+
#endif