dnscache: remove Curl_dns_entry_link

Unused function

Closes #21774
This commit is contained in:
Daniel Stenberg 2026-05-27 15:40:12 +02:00
parent 4f8ed62c49
commit ead2e13a8e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 0 additions and 19 deletions

View file

@ -616,20 +616,6 @@ CURLcode Curl_dnscache_add_negative(struct Curl_easy *data,
return CURLE_OUT_OF_MEMORY;
}
struct Curl_dns_entry *Curl_dns_entry_link(struct Curl_easy *data,
struct Curl_dns_entry *dns)
{
if(!dns)
return NULL;
else {
struct Curl_dnscache *dnscache = dnscache_get(data);
dnscache_lock(data, dnscache);
dns->refcount++;
dnscache_unlock(data, dnscache);
return dns;
}
}
/*
* Curl_dns_entry_unlink() releases a reference to the given cached DNS entry.
* When the reference count reaches 0, the entry is destroyed. It is important

View file

@ -80,11 +80,6 @@ void Curl_dns_entry_set_https_rr(struct Curl_dns_entry *dns,
struct Curl_https_rrinfo *hinfo);
#endif /* USE_HTTPSRR */
/* Increase the ref counter and return it for storing in another place.
* May be called with NULL, in which case it returns NULL. */
struct Curl_dns_entry *Curl_dns_entry_link(struct Curl_easy *data,
struct Curl_dns_entry *dns);
/* unlink a dns entry, frees all resources if it was the last reference.
* Always clears `*pdns`` */
void Curl_dns_entry_unlink(struct Curl_easy *data,