From 8df455479f8801bbebad8839fc96abbffa711603 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 14 May 2020 00:05:04 +0200 Subject: 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 --- tests/libtest/lib576.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/libtest/lib576.c') 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, , et al. + * Copyright (C) 1998 - 2020, Daniel Stenberg, , 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) { -- cgit v1.2.3