diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-12-18 19:43:10 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-12-18 19:43:10 +0100 |
commit | 2dda578f1e729ff906820936b65474967683aeda (patch) | |
tree | c7b6bff267442da1767f48b9306ab79c47de1db4 /src/resolve/resolved-dns-cache.c | |
parent | 2615691003b9d73a92590b8250a54ad135e3a33b (diff) |
resolved: rename dns_cache_remove() → dns_cache_remove_by_key()
Given that we already have dns_cache_remove_by_rr() this makes clearer
what the operation actually does.
Diffstat (limited to 'src/resolve/resolved-dns-cache.c')
-rw-r--r-- | src/resolve/resolved-dns-cache.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/resolve/resolved-dns-cache.c b/src/resolve/resolved-dns-cache.c index a6b9fb8f2d..c0bfcce7cd 100644 --- a/src/resolve/resolved-dns-cache.c +++ b/src/resolve/resolved-dns-cache.c @@ -107,7 +107,7 @@ static bool dns_cache_remove_by_rr(DnsCache *c, DnsResourceRecord *rr) { return false; } -static bool dns_cache_remove(DnsCache *c, DnsResourceKey *key) { +static bool dns_cache_remove_by_key(DnsCache *c, DnsResourceKey *key) { DnsCacheItem *first, *i, *n; assert(c); @@ -131,7 +131,7 @@ void dns_cache_flush(DnsCache *c) { assert(c); while ((key = hashmap_first_key(c->by_key))) - dns_cache_remove(c, key); + dns_cache_remove_by_key(c, key); assert(hashmap_size(c->by_key) == 0); assert(prioq_size(c->by_expiry) == 0); @@ -167,7 +167,7 @@ static void dns_cache_make_space(DnsCache *c, unsigned add) { /* Take an extra reference to the key so that it * doesn't go away in the middle of the remove call */ key = dns_resource_key_ref(i->key); - dns_cache_remove(c, key); + dns_cache_remove_by_key(c, key); } } @@ -202,7 +202,7 @@ void dns_cache_prune(DnsCache *c) { /* Take an extra reference to the key so that it * doesn't go away in the middle of the remove call */ key = dns_resource_key_ref(i->key); - dns_cache_remove(c, key); + dns_cache_remove_by_key(c, key); } } } @@ -504,7 +504,7 @@ static void dns_cache_remove_previous( * not on mDNS), delete all matching old RRs, so that we only * keep complete by_key in place. */ if (key) - dns_cache_remove(c, key); + dns_cache_remove_by_key(c, key); /* Second, flush all entries matching the answer, unless this * is an RR that is explicitly marked to be "shared" between @@ -516,7 +516,7 @@ static void dns_cache_remove_previous( if (flags & DNS_ANSWER_SHARED_OWNER) continue; - dns_cache_remove(c, rr->key); + dns_cache_remove_by_key(c, rr->key); } } @@ -638,13 +638,13 @@ fail: * added, just in case */ if (key) - dns_cache_remove(c, key); + dns_cache_remove_by_key(c, key); DNS_ANSWER_FOREACH_FLAGS(rr, flags, answer) { if ((flags & DNS_ANSWER_CACHEABLE) == 0) continue; - dns_cache_remove(c, rr->key); + dns_cache_remove_by_key(c, rr->key); } return r; |