]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hostip: store dns timeout as 'int'
authorDaniel Stenberg <daniel@haxx.se>
Mon, 8 May 2023 08:40:47 +0000 (10:40 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 May 2023 12:55:19 +0000 (14:55 +0200)
... because it set and held as an 'int' elsewhere and can never be
larger.

lib/hostip.c

index e410cda69ae6e970b870cd6369348c9f1f0b92c2..a1982aa0a2c683b0493f2e634d1cfcdc9ab5afa4 100644 (file)
@@ -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;