summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/set.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/util/set.c b/src/util/set.c
index 39250663954..d71f771807f 100644
--- a/src/util/set.c
+++ b/src/util/set.c
@@ -230,12 +230,8 @@ set_rehash(struct set *ht, unsigned new_size_index)
ht->entries = 0;
ht->deleted_entries = 0;
- for (entry = old_ht.table;
- entry != old_ht.table + old_ht.size;
- entry++) {
- if (entry_is_present(entry)) {
- set_add(ht, entry->hash, entry->key);
- }
+ set_foreach(&old_ht, entry) {
+ set_add(ht, entry->hash, entry->key);
}
ralloc_free(old_ht.table);