summaryrefslogtreecommitdiff
path: root/src/shared/hashmap.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-11 16:58:45 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-11 16:58:45 +0100
commiteccaf899331ecbe3807739b6356ebba3d71480c7 (patch)
tree7d9968c3ca604ded8b165b3463237d1822365e55 /src/shared/hashmap.c
parentf7340ab269828d917cd1281e33e6dd4fdfee67b3 (diff)
tree-wide: use our memset() macros instead of memset() itself
Diffstat (limited to 'src/shared/hashmap.c')
-rw-r--r--src/shared/hashmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c
index 5b329e0851..18c2c0ea3c 100644
--- a/src/shared/hashmap.c
+++ b/src/shared/hashmap.c
@@ -482,7 +482,7 @@ static unsigned skip_free_buckets(HashmapBase *h, unsigned idx) {
}
static void bucket_mark_free(HashmapBase *h, unsigned idx) {
- memset(bucket_at(h, idx), 0, hashmap_type_info[h->type].entry_size);
+ memzero(bucket_at(h, idx), hashmap_type_info[h->type].entry_size);
bucket_set_dib(h, idx, DIB_FREE);
}
@@ -1154,7 +1154,7 @@ static int resize_buckets(HashmapBase *h, unsigned entries_add) {
}
/* Zero the area of newly added entries (including the old DIB area) */
- memset(bucket_at(h, old_n_buckets), 0,
+ memzero(bucket_at(h, old_n_buckets),
(n_buckets(h) - old_n_buckets) * hi->entry_size);
/* The upper half of the new DIB array needs initialization */
@@ -1182,7 +1182,7 @@ static int resize_buckets(HashmapBase *h, unsigned entries_add) {
new_dibs[idx] = DIB_RAW_FREE;
bucket_move_entry(h, &swap, idx, IDX_PUT);
/* bucket_move_entry does not clear the source */
- memset(bucket_at(h, idx), 0, hi->entry_size);
+ memzero(bucket_at(h, idx), hi->entry_size);
do {
/*