diff options
Diffstat (limited to 'tests/libtest/lib541.c')
-rw-r--r-- | tests/libtest/lib541.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c index 64c7d20f5..9992da7f5 100644 --- a/tests/libtest/lib541.c +++ b/tests/libtest/lib541.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2011, 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 @@ -35,12 +35,12 @@ int test(char *URL) { CURL *curl; CURLcode res = CURLE_OK; - FILE *hd_src ; + FILE *hd_src; int hd; struct_stat file_info; int error; - if (!libtest_arg2) { + if(!libtest_arg2) { fprintf(stderr, "Usage: <url> <file-to-upload>\n"); return TEST_ERR_USAGE; } @@ -48,7 +48,7 @@ int test(char *URL) hd_src = fopen(libtest_arg2, "rb"); if(NULL == hd_src) { error = ERRNO; - fprintf(stderr, "fopen() failed with error: %d %s\n", + fprintf(stderr, "fopen failed with error: %d %s\n", error, strerror(error)); fprintf(stderr, "Error opening file: %s\n", libtest_arg2); return -2; /* if this happens things are major weird */ @@ -72,14 +72,14 @@ int test(char *URL) return TEST_ERR_MAJOR_BAD; } - if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { + if(curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { fprintf(stderr, "curl_global_init() failed\n"); fclose(hd_src); return TEST_ERR_MAJOR_BAD; } /* get a curl handle */ - if ((curl = curl_easy_init()) == NULL) { + if((curl = curl_easy_init()) == NULL) { fprintf(stderr, "curl_easy_init() failed\n"); curl_global_cleanup(); fclose(hd_src); @@ -93,7 +93,7 @@ int test(char *URL) test_setopt(curl, CURLOPT_VERBOSE, 1L); /* specify target */ - test_setopt(curl,CURLOPT_URL, URL); + test_setopt(curl, CURLOPT_URL, URL); /* now specify which file to upload */ test_setopt(curl, CURLOPT_READDATA, hd_src); |