summaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-02-01 00:24:19 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-02-01 07:50:59 +0100
commitddd31dc5dd960c4bd4dc995aec5178fddb24bfef (patch)
tree34f9466202037ebe09108216ce6488cd3ba2d0fb /lib/file.c
parent9409d0c26c7d46cde20beaec09ef0babb10f3794 (diff)
downloadcurl-ddd31dc5dd960c4bd4dc995aec5178fddb24bfef.tar.gz
time_t-fixes: remove typecasts to 'long' for info.filetime
They're now wrong. Reported-by: Michael Kaufmann Closes #2277
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/file.c b/lib/file.c
index 528f34afb..db04cc2da 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -403,12 +403,12 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
/* we could stat it, then read out the size */
expected_size = statbuf.st_size;
/* and store the modification time */
- data->info.filetime = (long)statbuf.st_mtime;
+ data->info.filetime = statbuf.st_mtime;
fstated = TRUE;
}
if(fstated && !data->state.range && data->set.timecondition) {
- if(!Curl_meets_timecondition(data, (time_t)data->info.filetime)) {
+ if(!Curl_meets_timecondition(data, data->info.filetime)) {
*done = TRUE;
return CURLE_OK;
}