diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-05-14 04:52:31 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-05-14 04:52:31 +0200 |
commit | 4ffd427a3331c4b7789e7dad8c5261904fd1346b (patch) | |
tree | 38db38db3f4a611796b5a117f0902c156b031fb5 /src/libmdsserver/hash-table.c | |
parent | fix bugs (diff) | |
download | mds-4ffd427a3331c4b7789e7dad8c5261904fd1346b.tar.gz mds-4ffd427a3331c4b7789e7dad8c5261904fd1346b.tar.bz2 mds-4ffd427a3331c4b7789e7dad8c5261904fd1346b.tar.xz |
fix errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/libmdsserver/hash-table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmdsserver/hash-table.c b/src/libmdsserver/hash-table.c index 4397af9..ab78f0a 100644 --- a/src/libmdsserver/hash-table.c +++ b/src/libmdsserver/hash-table.c @@ -76,7 +76,7 @@ static int rehash(hash_table_t* restrict this) hash_entry_t* destination; hash_entry_t* next; - if (xcalloc(this->buckets, old_capacity * 2 + 1, sizeof(hash_entry_t*))) + if (xcalloc(this->buckets, old_capacity * 2 + 1, hash_entry_t*)) return -1; this->capacity = old_capacity * 2 + 1; this->threshold = (size_t)((float)(this->capacity) * this->load_factor); @@ -124,7 +124,7 @@ int hash_table_create_fine_tuned(hash_table_t* restrict this, size_t initial_cap this->buckets = NULL; this->capacity = initial_capacity ? initial_capacity : 1; - if (xcalloc(this->buckets, this->capacity, sizeof(hash_entry_t*))) + if (xcalloc(this->buckets, this->capacity, hash_entry_t*)) return -1; this->load_factor = load_factor; this->threshold = (size_t)((float)(this->capacity) * load_factor); @@ -448,7 +448,7 @@ int hash_table_unmarshal(hash_table_t* restrict this, char* restrict data, remap buf_get_next(data, size_t, this->threshold); buf_get_next(data, size_t, this->size); - if (xcalloc(this->buckets, this->capacity, sizeof(hash_entry_t*))) + if (xcalloc(this->buckets, this->capacity, hash_entry_t*)) return -1; for (i = 0; i < n; i++) |