summaryrefslogtreecommitdiff
path: root/tests/libtest/lib576.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/lib576.c
parent5d54b5e6971cf26b35d11980d6953bf436419752 (diff)
downloadcurl-8df455479f8801bbebad8839fc96abbffa711603.tar.gz
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/lib576.c')
-rw-r--r--tests/libtest/lib576.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/libtest/lib576.c b/tests/libtest/lib576.c
index 3b9a9001d..f66825895 100644
--- a/tests/libtest/lib576.c
+++ b/tests/libtest/lib576.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, 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
@@ -24,10 +24,10 @@
#include "testutil.h"
#include "memdebug.h"
-typedef struct {
+struct chunk_data {
int remains;
int print_content;
-} chunk_data_t;
+};
static
long chunk_bgn(const struct curl_fileinfo *finfo, void *ptr, int remains);
@@ -37,7 +37,7 @@ long chunk_end(void *ptr);
static
long chunk_bgn(const struct curl_fileinfo *finfo, void *ptr, int remains)
{
- chunk_data_t *ch_d = ptr;
+ struct chunk_data *ch_d = ptr;
ch_d->remains = remains;
printf("=============================================================\n");
@@ -87,7 +87,7 @@ long chunk_bgn(const struct curl_fileinfo *finfo, void *ptr, int remains)
static
long chunk_end(void *ptr)
{
- chunk_data_t *ch_d = ptr;
+ struct chunk_data *ch_d = ptr;
if(ch_d->print_content) {
ch_d->print_content = 0;
printf("-------------------------------------------------------------\n");
@@ -101,7 +101,7 @@ int test(char *URL)
{
CURL *handle = NULL;
CURLcode res = CURLE_OK;
- chunk_data_t chunk_data = {0, 0};
+ struct chunk_data chunk_data = {0, 0};
curl_global_init(CURL_GLOBAL_ALL);
handle = curl_easy_init();
if(!handle) {