summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-05-08 10:40:47 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-05-08 14:55:19 +0200
commitf62557276a9e2a5fb1876d87f5eee614ad7ef109 (patch)
treec6abe6f6341a067962c95ee0e5c00854eec5b6ab
parent86535e30af71ace04377ea5861d613d7444fefc4 (diff)
downloadcurl-f62557276a9e2a5fb1876d87f5eee614ad7ef109.tar.gz
hostip: store dns timeout as 'int'
... because it set and held as an 'int' elsewhere and can never be larger.
-rw-r--r--lib/hostip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index e410cda69..a1982aa0a 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -196,8 +196,8 @@ create_hostcache_id(const char *name,
}
struct hostcache_prune_data {
- long cache_timeout;
time_t now;
+ int cache_timeout;
};
/*
@@ -222,7 +222,7 @@ hostcache_timestamp_remove(void *datap, void *hc)
* Prune the DNS cache. This assumes that a lock has already been taken.
*/
static void
-hostcache_prune(struct Curl_hash *hostcache, long cache_timeout, time_t now)
+hostcache_prune(struct Curl_hash *hostcache, int cache_timeout, time_t now)
{
struct hostcache_prune_data user;