resolved: rename dns_cache_item_remove_and_free() → _unlink_and_free()
authorLennart Poettering <lennart@poettering.net>
Fri, 18 Dec 2015 18:44:15 +0000 (19:44 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Dec 2015 18:44:15 +0000 (19:44 +0100)
In most of the other call, we called similar functions that remove the
data structure link-ups to other objects "unlink", hence we should here,
too.

src/resolve/resolved-dns-cache.c

index c0bfcce..0aacc74 100644 (file)
@@ -68,7 +68,7 @@ static void dns_cache_item_free(DnsCacheItem *i) {
 
 DEFINE_TRIVIAL_CLEANUP_FUNC(DnsCacheItem*, dns_cache_item_free);
 
-static void dns_cache_item_remove_and_free(DnsCache *c, DnsCacheItem *i) {
+static void dns_cache_item_unlink_and_free(DnsCache *c, DnsCacheItem *i) {
         DnsCacheItem *first;
 
         assert(c);
@@ -99,7 +99,7 @@ static bool dns_cache_remove_by_rr(DnsCache *c, DnsResourceRecord *rr) {
                 if (r < 0)
                         return r;
                 if (r > 0) {
-                        dns_cache_item_remove_and_free(c, i);
+                        dns_cache_item_unlink_and_free(c, i);
                         return true;
                 }
         }
@@ -195,7 +195,7 @@ void dns_cache_prune(DnsCache *c) {
                  * either remove only this one RR or the whole
                  * RRset */
                 if (i->shared_owner)
-                        dns_cache_item_remove_and_free(c, i);
+                        dns_cache_item_unlink_and_free(c, i);
                 else {
                         _cleanup_(dns_resource_key_unrefp) DnsResourceKey *key = NULL;