From 82abaee62f000d379646ee412af45a1f8a1ddc87 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 7 Jun 2022 17:40:28 +0200 Subject: -minor cleanups --- src/testcurl/test_post_loop.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/testcurl/test_post_loop.c') diff --git a/src/testcurl/test_post_loop.c b/src/testcurl/test_post_loop.c index ec42ffce..f9238faa 100644 --- a/src/testcurl/test_post_loop.c +++ b/src/testcurl/test_post_loop.c @@ -521,7 +521,7 @@ testExternalPost () if ((CURLM_OK == curl_multi_timeout (multi, &ctimeout)) && (ctimeout >= 0) && ((uint64_t) ctimeout < timeout64)) timeout64 = (uint64_t) ctimeout; - if ( (c == NULL) || (0 == running) ) + if (0 == running) timeout64 = 0; /* terminate quickly... */ tv.tv_sec = timeout64 / 1000; tv.tv_usec = (timeout64 % 1000) * 1000; @@ -576,14 +576,11 @@ testExternalPost () fprintf (stderr, "libcurl haven't returned OK code\n"); abort (); } - curl_multi_remove_handle (multi, c); - curl_easy_cleanup (c); - c = NULL; break; } MHD_run (d); } - if (c != NULL) + if (NULL != c) { curl_multi_remove_handle (multi, c); curl_easy_cleanup (c); -- cgit v1.2.3