diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-14 00:05:04 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-15 08:54:42 +0200 |
commit | 8df455479f8801bbebad8839fc96abbffa711603 (patch) | |
tree | ad0fcac278779ef75726f8aec6a061453c043282 /tests/unit | |
parent | 5d54b5e6971cf26b35d11980d6953bf436419752 (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/unit')
-rw-r--r-- | tests/unit/unit1305.c | 8 | ||||
-rw-r--r-- | tests/unit/unit1608.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c index 6e4bbb861..f3cd9d8f0 100644 --- a/tests/unit/unit1305.c +++ b/tests/unit/unit1305.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2017, 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 @@ -73,11 +73,11 @@ static void unit_stop(void) curl_global_cleanup(); } -static Curl_addrinfo *fake_ai(void) +static struct Curl_addrinfo *fake_ai(void) { - static Curl_addrinfo *ai; + static struct Curl_addrinfo *ai; - ai = calloc(1, sizeof(Curl_addrinfo)); + ai = calloc(1, sizeof(struct Curl_addrinfo)); if(!ai) return NULL; diff --git a/tests/unit/unit1608.c b/tests/unit/unit1608.c index 9105e2847..fc767d1d5 100644 --- a/tests/unit/unit1608.c +++ b/tests/unit/unit1608.c @@ -24,7 +24,7 @@ #include "hostip.h" CURLcode Curl_shuffle_addr(struct Curl_easy *data, - Curl_addrinfo **addr); + struct Curl_addrinfo **addr); #define NUM_ADDRS 8 static struct Curl_addrinfo addrs[NUM_ADDRS]; |