From 614febca516322f7add283adffa60385e009f7b1 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 17 Jun 2025 10:50:43 +0200 Subject: [PATCH] lib530, 582: smoothen out minor differences Fix indentation, casts, a few other minor difference between these tests that share a common codebase. Closes #17649 --- tests/libtest/lib530.c | 5 +++-- tests/libtest/lib582.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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; } -- 2.47.2