From f80bb1f7eaf31476a44c2093d3ee02aba817a0b0 Mon Sep 17 00:00:00 2001 From: Thomas Hindoe Paaboel Andersen Date: Fri, 28 Aug 2015 21:16:39 +0200 Subject: 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. --- src/basic/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3-54-g00ecf