mirror of
https://github.com/curl/curl.git
synced 2026-05-30 12:27:29 +03:00
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:
parent
171b623759
commit
614febca51
2 changed files with 5 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue