Fix order of calloc arguments.

(Patch by Dawid Gajownik)
This commit is contained in:
Hisham Muhammad
2014-01-16 18:51:16 -02:00
parent c1e0f6e17c
commit 76a715ee8c
9 changed files with 13 additions and 13 deletions

View File

@ -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;