diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-18 09:35:15 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-18 09:35:15 -0800 |
| commit | 2622d44dc4247766089c2e455d798070b3800b39 (patch) | |
| tree | 078f6fe94045520901f4215fbc15881378f77e2d /utils.h | |
| parent | 3bc3d824aa0710d5baa8042c1e4c422f703db1da (diff) | |
Switched calloc arg order
Diffstat (limited to 'utils.h')
| -rw-r--r-- | utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)) |
