From: Viktor Szakats Date: Tue, 17 Jun 2025 08:50:43 +0000 (+0200) Subject: lib530, 582: smoothen out minor differences X-Git-Tag: curl-8_15_0~224 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=614febca516322f7add283adffa60385e009f7b1;p=thirdparty%2Fcurl.git lib530, 582: smoothen out minor differences Fix indentation, casts, a few other minor difference between these tests that share a common codebase. Closes #17649 --- diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c index db81b6dfb5..c558799b22 100644 --- a/tests/libtest/lib530.c +++ b/tests/libtest/lib530.c @@ -60,7 +60,7 @@ static void t530_removeFd(struct t530_Sockets *sockets, curl_socket_t fd, if(sockets->sockets[i] == fd) { if(i < sockets->count - 1) memmove(&sockets->sockets[i], &sockets->sockets[i + 1], - sizeof(curl_socket_t) * (sockets->count - (i + 1))); + sizeof(curl_socket_t) * (sockets->count - (i + 1))); --sockets->count; } } @@ -189,7 +189,7 @@ static int t530_checkForCompletion(CURLM *curl, int *success) } else { curl_mfprintf(stderr, "Got an unexpected message from curl: %i\n", - message->msg); + (int)message->msg); result = 1; *success = 0; } @@ -372,6 +372,7 @@ test_cleanup: /* free local memory */ free(sockets.read.sockets); free(sockets.write.sockets); + return res; } diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c index fa8471da07..47a93f003f 100644 --- a/tests/libtest/lib582.c +++ b/tests/libtest/lib582.c @@ -53,7 +53,7 @@ static void t582_removeFd(struct t582_Sockets *sockets, curl_socket_t fd, if(sockets->sockets[i] == fd) { if(i < sockets->count - 1) memmove(&sockets->sockets[i], &sockets->sockets[i + 1], - sizeof(curl_socket_t) * (sockets->count - (i + 1))); + sizeof(curl_socket_t) * (sockets->count - (i + 1))); --sockets->count; } } @@ -271,7 +271,7 @@ static CURLcode test_lib582(char *URL) curl_mfprintf(stderr, "Set to upload %d bytes\n", (int)file_info.st_size); res_global_init(CURL_GLOBAL_ALL); - if(res) { + if(res != CURLE_OK) { fclose(hd_src); return res; }