diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-06-30 10:26:26 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-06-30 10:26:26 +0000 |
commit | 279dd6d878cc032b9024bf67743e0d30fba4874b (patch) | |
tree | 724b10b4ca2b58d5c828c0cde86ba8f62a690805 | |
parent | 2e0ad842d03de46d31fd8da88174d236203723a1 (diff) |
typecast the number passed to CURLOPT_INFILESIZE_LARGE as a curl_off_t
-rw-r--r-- | docs/examples/httpput.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/examples/httpput.c b/docs/examples/httpput.c index 162a6b0d8..0d360adc7 100644 --- a/docs/examples/httpput.c +++ b/docs/examples/httpput.c @@ -87,8 +87,10 @@ int main(int argc, char **argv) /* now specify which file to upload */ curl_easy_setopt(curl, CURLOPT_READDATA, hd_src); - /* and give the size of the upload */ - curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size); + /* provide the size of the upload, we specicially typecast the value + to curl_off_t since we must be sure to use the correct data size */ + curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, + (curl_off_t)file_info.st_size); /* Now run off and do what you've been told! */ res = curl_easy_perform(curl); |