aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-18 09:35:15 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-18 09:35:15 -0800
commit2622d44dc4247766089c2e455d798070b3800b39 (patch)
tree078f6fe94045520901f4215fbc15881378f77e2d /utils.h
parent3bc3d824aa0710d5baa8042c1e4c422f703db1da (diff)
Switched calloc arg order
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 ef0e311..e14ddbe 100644
--- a/utils.h
+++ b/utils.h
@@ -12,7 +12,7 @@
#define streq(a, b) (strcmp(a, b) == 0)
#define check(cond, ...) do { if (!(cond)) { fprintf(stderr, __VA_ARGS__); fwrite("\n", 1, 1, stderr); exit(1); } } while(0)
-#define new(t) memcheck(calloc(sizeof(t), 1))
+#define new(t) memcheck(calloc(1, sizeof(t)))
#define xcalloc(a,b) memcheck(calloc(a,b))
#define xrealloc(a,b) memcheck(realloc(a,b))