aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-01-20 14:24:56 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-01-20 14:24:56 +0000
commit8dd799b4bddc21f55b0ebc746ca00fba3bccafea (patch)
treed57fde4f202c4b0f5497118ba0e6470a5b3b3aa0
parenta38520c90da0bc5210354ba4527fca1327bb05ae (diff)
If you give a *_LARGE option you MUST make sure that the type of the passed-in
argument is a curl_off_t. If you use CURLOPT_INFILESIZE (without _LARGE) you must make sure that to pass in a type 'long' argument. */
-rw-r--r--docs/examples/ftpupload.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c
index 68b86fdf4..c0ae40a26 100644
--- a/docs/examples/ftpupload.c
+++ b/docs/examples/ftpupload.c
@@ -78,8 +78,12 @@ int main(int argc, char **argv)
DLL may not use the variable's memory when passed in to it from an app
like this. */
- /* and give the size of the upload (optional) */
- curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, file_info.st_size);
+ /* Set the size of the file to upload (optional). If you give a *_LARGE
+ option you MUST make sure that the type of the passed-in argument is a
+ curl_off_t. If you use CURLOPT_INFILESIZE (without _LARGE) you must
+ make sure that to pass in a type 'long' argument. */
+ 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);