mirror of
https://github.com/curl/curl.git
synced 2026-08-02 17:30:29 +03:00
tidy-up: miscellaneous
- INSTALL-CMAKE.md: add missing periods, text fixes. - md4, md5: sync variables names. - curl_trc: sync an argument type. - docs/examples: sync debug/trace function copies, constify, tidy-ups. - replace commented code with `#if 0`. - drop redundant parenthesis (macro values, `return`, around single variables, function calls). - fix indentation, apply clang-format in places. Closes #20481
This commit is contained in:
parent
ca5efd02b6
commit
3003c32cb2
62 changed files with 291 additions and 281 deletions
|
|
@ -404,7 +404,9 @@ static CURLcode test_cli_hx_download(const char *URL)
|
|||
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
|
||||
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
|
||||
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
|
||||
/* curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT); */
|
||||
#if 0
|
||||
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
|
||||
#endif
|
||||
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_PSL);
|
||||
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_HSTS);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,9 @@ static int progress_callback(void *clientp,
|
|||
{
|
||||
CURL *curl = (CURL *)clientp;
|
||||
curl_easy_pause(curl, CURLPAUSE_CONT);
|
||||
/* curl_easy_pause(curl, CURLPAUSE_RECV_CONT); */
|
||||
#if 0
|
||||
curl_easy_pause(curl, CURLPAUSE_RECV_CONT);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -43,10 +43,10 @@ static size_t WriteHeader(char *ptr, size_t size, size_t nmemb, void *stream)
|
|||
|
||||
static CURLcode test_lib1509(const char *URL)
|
||||
{
|
||||
long headerSize;
|
||||
CURLcode code;
|
||||
CURL *curl = NULL;
|
||||
CURLcode code;
|
||||
CURLcode result = CURLE_OK;
|
||||
long headerSize;
|
||||
|
||||
global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
|
|
|
|||
|
|
@ -95,8 +95,10 @@ static CURLcode test_lib1517(const char *URL)
|
|||
/* include headers in the output */
|
||||
test_setopt(curl, CURLOPT_HEADER, 1L);
|
||||
|
||||
#if 0
|
||||
/* detect HTTP error codes >= 400 */
|
||||
/* test_setopt(curl, CURLOPT_FAILONERROR, 1L); */
|
||||
test_setopt(curl, CURLOPT_FAILONERROR, 1L);
|
||||
#endif
|
||||
|
||||
/* Perform the request, result will get the return code */
|
||||
result = curl_easy_perform(curl);
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ static size_t header(char *ptr, size_t size, size_t nmemb, void *stream)
|
|||
|
||||
static CURLcode test_lib1556(const char *URL)
|
||||
{
|
||||
CURLcode code;
|
||||
CURL *curl = NULL;
|
||||
CURLcode code;
|
||||
CURLcode result = CURLE_OK;
|
||||
struct headerinfo info = { 0 };
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#error "this test requires FD_SETSIZE"
|
||||
#endif
|
||||
|
||||
#define T518_SAFETY_MARGIN (16)
|
||||
#define T518_SAFETY_MARGIN 16
|
||||
|
||||
#define NUM_OPEN (FD_SETSIZE + 10)
|
||||
#define NUM_NEEDED (NUM_OPEN + T518_SAFETY_MARGIN)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#error "this test requires FD_SETSIZE"
|
||||
#endif
|
||||
|
||||
#define T537_SAFETY_MARGIN (11)
|
||||
#define T537_SAFETY_MARGIN 11
|
||||
|
||||
#if defined(_WIN32) || defined(MSDOS)
|
||||
#define DEV_NULL "NUL"
|
||||
|
|
|
|||
|
|
@ -69,14 +69,18 @@ static size_t rtp_write(char *data, size_t size, size_t nmemb, void *stream)
|
|||
if(message_size - i > RTP_DATA_SIZE) {
|
||||
if(memcmp(RTP_DATA, data + i, RTP_DATA_SIZE) != 0) {
|
||||
curl_mprintf("RTP PAYLOAD CORRUPTED [%s]\n", data + i);
|
||||
/* return failure; */
|
||||
#if 0
|
||||
return failure;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(memcmp(RTP_DATA, data + i, message_size - i) != 0) {
|
||||
curl_mprintf("RTP PAYLOAD END CORRUPTED (%d), [%s]\n",
|
||||
message_size - i, data + i);
|
||||
/* return failure; */
|
||||
#if 0
|
||||
return failure;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -632,7 +632,9 @@ static int test_dnsd(int argc, char **argv)
|
|||
clear_advisor_read_lock(loglockfile);
|
||||
}
|
||||
|
||||
/* logmsg("end of one transfer"); */
|
||||
#if 0
|
||||
logmsg("end of one transfer");
|
||||
#endif
|
||||
}
|
||||
|
||||
dnsd_cleanup:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue