aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libmdsserver/fd-table.c4
-rw-r--r--src/libmdsserver/hash-table.c6
-rw-r--r--src/mds-server/client.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/libmdsserver/fd-table.c b/src/libmdsserver/fd-table.c
index 0d5a0dc..9fe62ca 100644
--- a/src/libmdsserver/fd-table.c
+++ b/src/libmdsserver/fd-table.c
@@ -48,8 +48,8 @@ int fd_table_create_tuned(fd_table_t* restrict this, size_t initial_capacity)
the time overhead of `fd_table_contains_value`. */
bitcap = (this->capacity + 63) / 64;
- if (xcalloc(this->used, bitcap, sizeof(size_t))) return -1;
- if (xcalloc(this->values, this->capacity, sizeof(size_t))) return -1;
+ if (xcalloc(this->used, bitcap, size_t)) return -1;
+ if (xcalloc(this->values, this->capacity, size_t)) return -1;
return 0;
}
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++)
diff --git a/src/mds-server/client.c b/src/mds-server/client.c
index 3c8fb2d..c8e25ea 100644
--- a/src/mds-server/client.c
+++ b/src/mds-server/client.c
@@ -163,7 +163,7 @@ size_t client_unmarshal(client_t* restrict this, char* restrict data)
rc += n;
}
buf_get_next(data, size_t, n);
- if (xmalloc(this->multicasts, n, sizeof(multicast_t)))
+ if (xmalloc(this->multicasts, n, multicast_t))
goto fail;
for (i = 0; i < n; i++, this->multicasts_count++)
{