aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/anyauthput.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-02-11 09:42:38 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-02-11 09:44:45 +0100
commit3a6563d668406df1703edb4202afc038fcf9d30e (patch)
tree0fbb9438d99c13049f72b10c966583e582e4e238 /docs/examples/anyauthput.c
parent936d8f07dfbf2ac22ffd216f5363152bcecc2651 (diff)
examples: adhere to curl code style
All plain C examples now (mostly) adhere to the curl code style. While they are only examples, they had diverted so much and contained all sorts of different mixed code styles by now. Having them use a unified style helps users and readability. Also, as they get copy-and-pasted widely by users, making sure they're clean and nice is a good idea. 573 checksrc warnings were addressed.
Diffstat (limited to 'docs/examples/anyauthput.c')
-rw-r--r--docs/examples/anyauthput.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/examples/anyauthput.c b/docs/examples/anyauthput.c
index 851d6c511..bc6ee5fff 100644
--- a/docs/examples/anyauthput.c
+++ b/docs/examples/anyauthput.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, 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
@@ -119,7 +119,7 @@ int main(int argc, char **argv)
{
CURL *curl;
CURLcode res;
- intptr_t hd ;
+ intptr_t hd;
struct stat file_info;
char *file;
@@ -132,7 +132,7 @@ int main(int argc, char **argv)
url = argv[2];
/* get the file size of the local file */
- hd = open(file, O_RDONLY) ;
+ hd = open(file, O_RDONLY);
fstat(hd, &file_info);
/* In windows, this will init the winsock stuff */
@@ -154,11 +154,11 @@ int main(int argc, char **argv)
curl_easy_setopt(curl, CURLOPT_IOCTLDATA, (void*)hd);
/* enable "uploading" (which means PUT when doing HTTP) */
- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L) ;
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
/* specify target URL, and note that this URL should also include a file
name, not only a directory (as you can do with GTP uploads) */
- curl_easy_setopt(curl,CURLOPT_URL, url);
+ curl_easy_setopt(curl, CURLOPT_URL, url);
/* and give the size of the upload, this supports large file sizes
on systems that have general support for it */