diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2007-07-12 21:11:10 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2007-07-12 21:11:10 +0000 |
commit | 49ce3e5160a9576e797bf87cef012b09d1c54ecb (patch) | |
tree | 9b8e476de272cfd92bb3d857aa3c6eef273140b7 /docs/examples/ftpupload.c | |
parent | 4a728747e6f8845e500910e397dfc99aaf4a7984 (diff) |
Fixed some compile warnings and errors and improved portability in the
examples.
Removed ftp3rdparty.c since libcurl doesn't support 3rd party FTP transfers
any longer.
Diffstat (limited to 'docs/examples/ftpupload.c')
-rw-r--r-- | docs/examples/ftpupload.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/examples/ftpupload.c b/docs/examples/ftpupload.c index c0ae40a26..65f8a8a79 100644 --- a/docs/examples/ftpupload.c +++ b/docs/examples/ftpupload.c @@ -31,14 +31,13 @@ int main(int argc, char **argv) { CURL *curl; CURLcode res; - FILE *ftpfile; FILE * hd_src ; int hd ; struct stat file_info; struct curl_slist *headerlist=NULL; - char buf_1 [] = "RNFR " UPLOAD_FILE_AS; - char buf_2 [] = "RNTO " RENAME_FILE_TO; + static const char buf_1 [] = "RNFR " UPLOAD_FILE_AS; + static const char buf_2 [] = "RNTO " RENAME_FILE_TO; /* get the file size of the local file */ hd = open(LOCAL_FILE, O_RDONLY) ; @@ -61,7 +60,7 @@ int main(int argc, char **argv) headerlist = curl_slist_append(headerlist, buf_2); /* enable uploading */ - curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ; + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ; /* specify target */ curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL); |