]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_getparam: drop unused time() call
authorDaniel Stenberg <daniel@haxx.se>
Sun, 27 Oct 2024 10:50:48 +0000 (11:50 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 27 Oct 2024 22:32:34 +0000 (23:32 +0100)
The second argument to curl_getdate() once took a time argument, but
that feature has been gone for decades, thus passing in a date there
makes no difference.

Closes #15420

src/tool_getparam.c

index 0ce790f30a15a8c7115c6ddb0ed6ff970a45679e..f3ab493d1ea44df2145566ecb9423ec0bfe84339 100644 (file)
@@ -1027,7 +1027,6 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
 {
   int rc;
   const char *parse = NULL;
-  time_t now;
   bool longopt = FALSE;
   bool singleopt = FALSE; /* when true means '-o foo' used '-ofoo' */
   size_t nopts = 0; /* options processed in `flag`*/
@@ -2647,8 +2646,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
         nextarg++;
         break;
       }
-      now = time(NULL);
-      config->condtime = (curl_off_t)curl_getdate(nextarg, &now);
+      config->condtime = (curl_off_t)curl_getdate(nextarg, NULL);
       if(-1 == config->condtime) {
         /* now let's see if it is a filename to get the time from instead! */
         rc = getfiletime(nextarg, global, &value);