]> sjero.net Git - wget/blobdiff - src/http.c
[svn] Avoid code repetition between time_str and datetime_str.
[wget] / src / http.c
index 54091bf428f372925d73093023b4e5ce9d9dd1f7..77f9797232cdb648dde8b641c4eb2d023ca0e7bb 100644 (file)
@@ -1,5 +1,5 @@
 /* HTTP support.
-   Copyright (C) 1996-2005 Free Software Foundation, Inc.
+   Copyright (C) 1996-2006 Free Software Foundation, Inc.
 
 This file is part of GNU Wget.
 
@@ -757,7 +757,7 @@ print_server_response (const struct response *resp, const char *prefix)
         --e;
       /* This is safe even on printfs with broken handling of "%.<n>s"
          because resp->headers ends with \0.  */
-      logprintf (LOG_VERBOSE, "%s%.*s\n", prefix, e - b, b);
+      logprintf (LOG_VERBOSE, "%s%.*s\n", prefix, (int) (e - b), b);
     }
 }
 
@@ -2280,7 +2280,7 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
       sleep_between_retrievals (count);
       
       /* Get the current time string.  */
-      tms = time_str (NULL);
+      tms = time_str (time (NULL));
       
       /* Print fetch message, if opt.verbose.  */
       if (opt.verbose)
@@ -2344,7 +2344,7 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
       err = gethttp (u, &hstat, dt, proxy);
 
       /* Time?  */
-      tms = time_str (NULL);
+      tms = time_str (time (NULL));
       
       /* Get the new location (with or without the redirection).  */
       if (hstat.newloc)