aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-13 19:01:49 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-13 19:01:49 -0800
commit43aeadaab8c29351e506c03829c3dc74a9f6b86a (patch)
treeaa8ec115dee11f7a8adcd9f9e1a649bb5e985fb3 /utils.h
parent3443d817150e641221749bf129cc6716e6baaf32 (diff)
Replaced _exit()s with exits()
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.h b/utils.h
index aa2fba1..f9d27d4 100644
--- a/utils.h
+++ b/utils.h
@@ -12,7 +12,7 @@
#define streq(a, b) (strcmp(a, b) == 0)
// TODO: better error reporting
-#define check(cond, ...) do { if (!(cond)) { fprintf(stderr, __VA_ARGS__); fwrite("\n", 1, 1, stderr); _exit(1); } } while(0)
+#define check(cond, ...) do { if (!(cond)) { fprintf(stderr, __VA_ARGS__); fwrite("\n", 1, 1, stderr); exit(1); } } while(0)
#define debug(...) do { if (verbose) fprintf(stderr, __VA_ARGS__); } while(0)
#define new(t) memcheck(calloc(sizeof(t), 1))
#define xcalloc(a,b) memcheck(calloc(a,b))