aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-11-23 12:59:19 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2021-11-23 15:11:50 +0300
commit7f68d8de552a36c873094771bb053ec95a8e8bb8 (patch)
treeeaf1e4e90c1818c5029b00f4aed1fd9aabcc5918 /src/testcurl
parent742e5bd1b66cc57b0b7e10b9fcd676121f6f748f (diff)
downloadlibmicrohttpd-7f68d8de552a36c873094771bb053ec95a8e8bb8.tar.gz
libmicrohttpd-7f68d8de552a36c873094771bb053ec95a8e8bb8.zip
Tests: fixed code style
Diffstat (limited to 'src/testcurl')
-rw-r--r--src/testcurl/test_concurrent_stop.c8
-rw-r--r--src/testcurl/test_delete.c2
-rw-r--r--src/testcurl/test_digestauth.c2
-rw-r--r--src/testcurl/test_digestauth_sha256.c2
-rw-r--r--src/testcurl/test_digestauth_with_arguments.c2
-rw-r--r--src/testcurl/test_get_iovec.c14
-rw-r--r--src/testcurl/test_patch.c2
-rw-r--r--src/testcurl/test_put.c2
-rw-r--r--src/testcurl/test_quiesce.c4
9 files changed, 19 insertions, 19 deletions
diff --git a/src/testcurl/test_concurrent_stop.c b/src/testcurl/test_concurrent_stop.c
index ac2eae15..ee41ef94 100644
--- a/src/testcurl/test_concurrent_stop.c
+++ b/src/testcurl/test_concurrent_stop.c
@@ -105,7 +105,7 @@ start_watchdog (int timeout, const char *obj_name)
105 watchdog_continue = 1; 105 watchdog_continue = 1;
106 watchdog_obj = obj_name; 106 watchdog_obj = obj_name;
107 if (0 != pthread_create (&watchdog_tid, NULL, &thread_watchdog, 107 if (0 != pthread_create (&watchdog_tid, NULL, &thread_watchdog,
108 (void*) (intptr_t) timeout)) 108 (void *) (intptr_t) timeout))
109 { 109 {
110 fprintf (stderr, "Failed to start watchdog.\n"); 110 fprintf (stderr, "Failed to start watchdog.\n");
111 _exit (99); 111 _exit (99);
@@ -173,7 +173,7 @@ thread_gets (void *param)
173{ 173{
174 CURL *c; 174 CURL *c;
175 CURLcode errornum; 175 CURLcode errornum;
176 char *const url = (char*) param; 176 char *const url = (char *) param;
177 177
178 c = NULL; 178 c = NULL;
179 c = curl_easy_init (); 179 c = curl_easy_init ();
@@ -226,7 +226,7 @@ do_gets (void *param)
226 226
227 for (j = 0; j < PAR; j++) 227 for (j = 0; j < PAR; j++)
228 { 228 {
229 if (0 != pthread_create (&par[j], NULL, &thread_gets, (void*) url)) 229 if (0 != pthread_create (&par[j], NULL, &thread_gets, (void *) url))
230 { 230 {
231 fprintf (stderr, "pthread_create failed.\n"); 231 fprintf (stderr, "pthread_create failed.\n");
232 continue_requesting = 0; 232 continue_requesting = 0;
@@ -251,7 +251,7 @@ start_gets (int port)
251{ 251{
252 pthread_t tid; 252 pthread_t tid;
253 continue_requesting = 1; 253 continue_requesting = 1;
254 if (0 != pthread_create (&tid, NULL, &do_gets, (void*) (intptr_t) port)) 254 if (0 != pthread_create (&tid, NULL, &do_gets, (void *) (intptr_t) port))
255 { 255 {
256 fprintf (stderr, "pthread_create failed.\n"); 256 fprintf (stderr, "pthread_create failed.\n");
257 _exit (99); 257 _exit (99);
diff --git a/src/testcurl/test_delete.c b/src/testcurl/test_delete.c
index 5eb5a649..43bd2840 100644
--- a/src/testcurl/test_delete.c
+++ b/src/testcurl/test_delete.c
@@ -115,7 +115,7 @@ ahc_echo (void *cls,
115 *done = 1; 115 *done = 1;
116 return MHD_YES; 116 return MHD_YES;
117 } 117 }
118 response = MHD_create_response_from_buffer (strlen (url), (void*) url, 118 response = MHD_create_response_from_buffer (strlen (url), (void *) url,
119 MHD_RESPMEM_MUST_COPY); 119 MHD_RESPMEM_MUST_COPY);
120 ret = MHD_queue_response (connection, MHD_HTTP_OK, response); 120 ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
121 MHD_destroy_response (response); 121 MHD_destroy_response (response);
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
index 49a3c52b..3b2f2501 100644
--- a/src/testcurl/test_digestauth.c
+++ b/src/testcurl/test_digestauth.c
@@ -217,7 +217,7 @@ testDigestAuth ()
217 GetLastError ()); 217 GetLastError ());
218 return 1; 218 return 1;
219 } 219 }
220 b = CryptGenRandom (cc, 8, (BYTE*) rnd); 220 b = CryptGenRandom (cc, 8, (BYTE *) rnd);
221 if (b == 0) 221 if (b == 0)
222 { 222 {
223 fprintf (stderr, 223 fprintf (stderr,
diff --git a/src/testcurl/test_digestauth_sha256.c b/src/testcurl/test_digestauth_sha256.c
index d1b79dff..a720c69b 100644
--- a/src/testcurl/test_digestauth_sha256.c
+++ b/src/testcurl/test_digestauth_sha256.c
@@ -221,7 +221,7 @@ testDigestAuth ()
221 GetLastError ()); 221 GetLastError ());
222 return 1; 222 return 1;
223 } 223 }
224 b = CryptGenRandom (cc, 8, (BYTE*) rnd); 224 b = CryptGenRandom (cc, 8, (BYTE *) rnd);
225 if (b == 0) 225 if (b == 0)
226 { 226 {
227 fprintf (stderr, 227 fprintf (stderr,
diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c
index 2723b5a9..523c9552 100644
--- a/src/testcurl/test_digestauth_with_arguments.c
+++ b/src/testcurl/test_digestauth_with_arguments.c
@@ -196,7 +196,7 @@ testDigestAuth ()
196 GetLastError ()); 196 GetLastError ());
197 return 1; 197 return 1;
198 } 198 }
199 b = CryptGenRandom (cc, 8, (BYTE*) rnd); 199 b = CryptGenRandom (cc, 8, (BYTE *) rnd);
200 if (b == 0) 200 if (b == 0)
201 { 201 {
202 fprintf (stderr, "Failed to generate 8 random bytes: %lu\n", 202 fprintf (stderr, "Failed to generate 8 random bytes: %lu\n",
diff --git a/src/testcurl/test_get_iovec.c b/src/testcurl/test_get_iovec.c
index f87cd4eb..ae30f6d6 100644
--- a/src/testcurl/test_get_iovec.c
+++ b/src/testcurl/test_get_iovec.c
@@ -99,7 +99,7 @@ iovncont_free_callback (void *cls)
99 unsigned int i; 99 unsigned int i;
100 100
101 for (i = 0; i < TESTSTR_IOVCNT; ++i) 101 for (i = 0; i < TESTSTR_IOVCNT; ++i)
102 free ((void*) iov[i].iov_base); 102 free ((void *) iov[i].iov_base);
103 free (iov); 103 free (iov);
104} 104}
105 105
@@ -245,7 +245,7 @@ err_out:
245 for (j = 0; j < TESTSTR_IOVCNT; ++j) 245 for (j = 0; j < TESTSTR_IOVCNT; ++j)
246 { 246 {
247 if (NULL != iov[j].iov_base) 247 if (NULL != iov[j].iov_base)
248 free ((void*) iov[j].iov_base); 248 free ((void *) iov[j].iov_base);
249 } 249 }
250 free (iov); 250 free (iov);
251 return MHD_NO; 251 return MHD_NO;
@@ -270,7 +270,7 @@ testInternalGet (bool contiguous)
270 port += 10; 270 port += 10;
271 } 271 }
272 272
273 cbc.buf = (char*) readbuf; 273 cbc.buf = (char *) readbuf;
274 cbc.size = sizeof(readbuf); 274 cbc.size = sizeof(readbuf);
275 cbc.pos = 0; 275 cbc.pos = 0;
276 276
@@ -350,7 +350,7 @@ testMultithreadedGet ()
350 port += 10; 350 port += 10;
351 } 351 }
352 352
353 cbc.buf = (char*) readbuf; 353 cbc.buf = (char *) readbuf;
354 cbc.size = sizeof(readbuf); 354 cbc.size = sizeof(readbuf);
355 cbc.pos = 0; 355 cbc.pos = 0;
356 d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION 356 d = MHD_start_daemon (MHD_USE_THREAD_PER_CONNECTION
@@ -422,7 +422,7 @@ testMultithreadedPoolGet ()
422 port += 10; 422 port += 10;
423 } 423 }
424 424
425 cbc.buf = (char*) readbuf; 425 cbc.buf = (char *) readbuf;
426 cbc.size = sizeof(readbuf); 426 cbc.size = sizeof(readbuf);
427 cbc.pos = 0; 427 cbc.pos = 0;
428 d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG 428 d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG
@@ -510,7 +510,7 @@ testExternalGet ()
510 } 510 }
511 511
512 multi = NULL; 512 multi = NULL;
513 cbc.buf = (char*) readbuf; 513 cbc.buf = (char *) readbuf;
514 cbc.size = sizeof(readbuf); 514 cbc.size = sizeof(readbuf);
515 cbc.pos = 0; 515 cbc.pos = 0;
516 d = MHD_start_daemon (MHD_USE_ERROR_LOG, 516 d = MHD_start_daemon (MHD_USE_ERROR_LOG,
@@ -678,7 +678,7 @@ testUnknownPortGet ()
678 addr.sin_port = 0; 678 addr.sin_port = 0;
679 addr.sin_addr.s_addr = INADDR_ANY; 679 addr.sin_addr.s_addr = INADDR_ANY;
680 680
681 cbc.buf = (char*) readbuf; 681 cbc.buf = (char *) readbuf;
682 cbc.size = sizeof(readbuf); 682 cbc.size = sizeof(readbuf);
683 cbc.pos = 0; 683 cbc.pos = 0;
684 d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG, 684 d = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
diff --git a/src/testcurl/test_patch.c b/src/testcurl/test_patch.c
index b4ff2673..f443ad08 100644
--- a/src/testcurl/test_patch.c
+++ b/src/testcurl/test_patch.c
@@ -115,7 +115,7 @@ ahc_echo (void *cls,
115 *done = 1; 115 *done = 1;
116 return MHD_YES; 116 return MHD_YES;
117 } 117 }
118 response = MHD_create_response_from_buffer (strlen (url), (void*) url, 118 response = MHD_create_response_from_buffer (strlen (url), (void *) url,
119 MHD_RESPMEM_MUST_COPY); 119 MHD_RESPMEM_MUST_COPY);
120 ret = MHD_queue_response (connection, MHD_HTTP_OK, response); 120 ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
121 MHD_destroy_response (response); 121 MHD_destroy_response (response);
diff --git a/src/testcurl/test_put.c b/src/testcurl/test_put.c
index 2db87b8c..f572a9a8 100644
--- a/src/testcurl/test_put.c
+++ b/src/testcurl/test_put.c
@@ -115,7 +115,7 @@ ahc_echo (void *cls,
115 *done = 1; 115 *done = 1;
116 return MHD_YES; 116 return MHD_YES;
117 } 117 }
118 response = MHD_create_response_from_buffer (strlen (url), (void*) url, 118 response = MHD_create_response_from_buffer (strlen (url), (void *) url,
119 MHD_RESPMEM_MUST_COPY); 119 MHD_RESPMEM_MUST_COPY);
120 ret = MHD_queue_response (connection, MHD_HTTP_OK, response); 120 ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
121 MHD_destroy_response (response); 121 MHD_destroy_response (response);
diff --git a/src/testcurl/test_quiesce.c b/src/testcurl/test_quiesce.c
index 43f7536c..33d34dd5 100644
--- a/src/testcurl/test_quiesce.c
+++ b/src/testcurl/test_quiesce.c
@@ -284,7 +284,7 @@ testGet (int type, int pool_count, int poll_flag)
284 return 2; 284 return 2;
285 } 285 }
286 if (0 != pthread_create (&thrd, NULL, &ServeOneRequest, 286 if (0 != pthread_create (&thrd, NULL, &ServeOneRequest,
287 (void*) (intptr_t) fd)) 287 (void *) (intptr_t) fd))
288 { 288 {
289 fprintf (stderr, "pthread_create failed\n"); 289 fprintf (stderr, "pthread_create failed\n");
290 curl_easy_cleanup (c); 290 curl_easy_cleanup (c);
@@ -303,7 +303,7 @@ testGet (int type, int pool_count, int poll_flag)
303 return 2; 303 return 2;
304 } 304 }
305 305
306 if (0 != pthread_join (thrd, (void**) &thrdRet)) 306 if (0 != pthread_join (thrd, (void **) &thrdRet))
307 { 307 {
308 fprintf (stderr, "pthread_join failed\n"); 308 fprintf (stderr, "pthread_join failed\n");
309 curl_easy_cleanup (c); 309 curl_easy_cleanup (c);