From 76a715ee8c8c8ace5a341d81ca39dd1747886187 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 16 Jan 2014 18:51:16 -0200 Subject: Fix order of calloc arguments. (Patch by Dawid Gajownik) --- Hashtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Hashtable.c') diff --git a/Hashtable.c b/Hashtable.c index 9d84db8a..0f61519e 100644 --- a/Hashtable.c +++ b/Hashtable.c @@ -76,7 +76,7 @@ Hashtable* Hashtable_new(int size, bool owner) { this = (Hashtable*) malloc(sizeof(Hashtable)); this->items = 0; this->size = size; - this->buckets = (HashtableItem**) calloc(sizeof(HashtableItem*), size); + this->buckets = (HashtableItem**) calloc(size, sizeof(HashtableItem*)); this->owner = owner; assert(Hashtable_isConsistent(this)); return this; -- cgit v1.2.3