← Commit list

470611d76c

Daniel Stenberg
Daniel Stenberg
2025-09-24
FAILED Duration: 151s

Subject

hostip: remove unnecessary leftover INT_MAX check in Curl_dnscache_prune

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/hostip.c+3 -7
@@ -279,13 +279,9 @@ void Curl_dnscache_prune(struct Curl_easy *data)
/* Remove outdated and unused entries from the hostcache */
timediff_t oldest_ms = dnscache_prune(&dnscache->entries, timeout_ms, now);
- if(Curl_hash_count(&dnscache->entries) > MAX_DNS_CACHE_SIZE) {
- if(oldest_ms < INT_MAX)
- /* prune the ones over half this age */
- timeout_ms = (int)oldest_ms / 2;
- else
- timeout_ms = INT_MAX/2;
- }
+ if(Curl_hash_count(&dnscache->entries) > MAX_DNS_CACHE_SIZE)
+ /* prune the ones over half this age */
+ timeout_ms = oldest_ms / 2;
else
break;