lib530, 582: smoothen out minor differences

Fix indentation, casts, a few other minor difference between these tests
that share a common codebase.

Closes #17649
This commit is contained in:
Viktor Szakats 2025-06-17 10:50:43 +02:00
parent 171b623759
commit 614febca51
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
2 changed files with 5 additions and 4 deletions

View file

@ -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;
}

View file

@ -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;
}