summaryrefslogtreecommitdiff
path: root/src/basic/util.h
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-08-28 21:16:39 +0200
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2015-08-30 02:32:33 +0200
commitf80bb1f7eaf31476a44c2093d3ee02aba817a0b0 (patch)
tree9782bf476c4d607b922ba7068bfc613faf4fe142 /src/basic/util.h
parenta19222e1d39e8f0ae254bf02b7babb0bd73ee5be (diff)
util: make malloc0 ask calloc for one block of size n
... instead of an array of n individual bytes. Silences a lot of warnings in smatch.
Diffstat (limited to 'src/basic/util.h')
-rw-r--r--src/basic/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/util.h b/src/basic/util.h
index 1ead7b5419..1484ef58e5 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -83,7 +83,7 @@ int strcmp_ptr(const char *a, const char *b) _pure_;
#define newdup(t, p, n) ((t*) memdup_multiply(p, sizeof(t), (n)))
-#define malloc0(n) (calloc((n), 1))
+#define malloc0(n) (calloc(1, (n)))
static inline void *mfree(void *memory) {
free(memory);