aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib1156.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-14 00:05:04 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-15 08:54:42 +0200
commit8df455479f8801bbebad8839fc96abbffa711603 (patch)
treead0fcac278779ef75726f8aec6a061453c043282 /tests/libtest/lib1156.c
parent5d54b5e6971cf26b35d11980d6953bf436419752 (diff)
source cleanup: remove all custom typedef structs
- Stick to a single unified way to use structs - Make checksrc complain on 'typedef struct {' - Allow them in tests, public headers and examples - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually typedef different types/structs depending on build conditions. Closes #5338
Diffstat (limited to 'tests/libtest/lib1156.c')
-rw-r--r--tests/libtest/lib1156.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/libtest/lib1156.c b/tests/libtest/lib1156.c
index df6062c56..ff94d9cfd 100644
--- a/tests/libtest/lib1156.c
+++ b/tests/libtest/lib1156.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, 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
@@ -40,12 +40,12 @@
#define F_CONTENTRANGE (1 << 3) /* Server sends content-range hdr. */
#define F_IGNOREBODY (1 << 4) /* Body should be ignored. */
-typedef struct {
+struct testparams {
unsigned int flags; /* ORed flags as above. */
CURLcode result; /* Code that should be returned by curl_easy_perform(). */
-} testparams;
+};
-static const testparams params[] = {
+static const struct testparams params[] = {
{ 0, CURLE_OK },
{ F_CONTENTRANGE, CURLE_OK },
{ F_FAIL, CURLE_OK },
@@ -82,7 +82,7 @@ static size_t writedata(char *data, size_t size, size_t nmemb, void *userdata)
return size * nmemb;
}
-static int onetest(CURL *curl, const char *url, const testparams *p)
+static int onetest(CURL *curl, const char *url, const struct testparams *p)
{
CURLcode res;
unsigned int replyselector;