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/lib1156.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/libtest/lib1156.c') 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, , 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 @@ -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; -- cgit v1.2.3