]> granicus.if.org Git - curl/commitdiff
Tor Arntsen's fix for the bad (64bit wise) typecast when using gmtime()
authorDaniel Stenberg <daniel@haxx.se>
Fri, 13 Feb 2004 06:59:49 +0000 (06:59 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 13 Feb 2004 06:59:49 +0000 (06:59 +0000)
lib/ftp.c

index 5450c854386abec5215ee26c044433a92e4f9801..da204255ba9fde05f9123bf4a6ae025d5d42a386 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2238,11 +2238,12 @@ CURLcode ftp_perform(struct connectdata *conn,
 #ifdef HAVE_STRFTIME
     if(data->set.get_filetime && (data->info.filetime>=0) ) {
       struct tm *tm;
+      time_t clock = (time_t)data->info.filetime;
 #ifdef HAVE_GMTIME_R
       struct tm buffer;
-      tm = (struct tm *)gmtime_r((time_t *)&data->info.filetime, &buffer);
+      tm = (struct tm *)gmtime_r(&clock, &buffer);
 #else
-      tm = gmtime((time_t *)&data->info.filetime);
+      tm = gmtime(&clock);
 #endif
       /* format: "Tue, 15 Nov 1994 12:45:26" */
       strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",