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:
Viktor Szakats 2026-01-23 12:59:42 +01:00
parent ca5efd02b6
commit 3003c32cb2
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
62 changed files with 291 additions and 281 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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)

View file

@ -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"

View file

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

View file

@ -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: