diff options
| author | Emilio G. Cota | 2018-09-10 19:43:06 +0200 |
|---|---|---|
| committer | Richard Henderson | 2018-09-26 17:55:54 +0200 |
| commit | 6579f10779b5b5ed2e978e7b8cae7bcbf8665254 (patch) | |
| tree | 5205a4d983f8b57a0851a9fc78e2cc216100bf25 /util | |
| parent | qht: constify qht_lookup (diff) | |
| download | qemu-6579f10779b5b5ed2e978e7b8cae7bcbf8665254.tar.gz qemu-6579f10779b5b5ed2e978e7b8cae7bcbf8665254.tar.xz qemu-6579f10779b5b5ed2e978e7b8cae7bcbf8665254.zip | |
qht: constify qht_statistics_init
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'util')
| -rw-r--r-- | util/qht.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/qht.c b/util/qht.c index 020dfe6912..4378775d68 100644 --- a/util/qht.c +++ b/util/qht.c @@ -895,9 +895,9 @@ bool qht_resize(struct qht *ht, size_t n_elems) } /* pass @stats to qht_statistics_destroy() when done */ -void qht_statistics_init(struct qht *ht, struct qht_stats *stats) +void qht_statistics_init(const struct qht *ht, struct qht_stats *stats) { - struct qht_map *map; + const struct qht_map *map; int i; map = atomic_rcu_read(&ht->map); @@ -914,8 +914,8 @@ void qht_statistics_init(struct qht *ht, struct qht_stats *stats) stats->head_buckets = map->n_buckets; for (i = 0; i < map->n_buckets; i++) { - struct qht_bucket *head = &map->buckets[i]; - struct qht_bucket *b; + const struct qht_bucket *head = &map->buckets[i]; + const struct qht_bucket *b; unsigned int version; size_t buckets; size_t entries; |
