From 0ffab25b6c9f59223079e3d85edfb5553d397651 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 12 Jun 2026 00:33:40 +0200 Subject: [PATCH] tidy-up: miscellaneous - `N byte` -> `N-byte` or `N bytes`. - INTERNALS.md: language tweaks. - schannel: language tweak in comment/error message. - socks_gssapi, socks_sspi: simplify composing an error message. (at a cost of 8 extra constant string bytes.) - m4/curl-compilers.m4: fix typo in link (in comment). - contrithanks.sh: fix indent, drop stray `;` terminator. - lib, src, tests: drop/fix a bunch of badwords. - fix typos in comments. - fix indent, stray spaces. Some of these spotted by GitHub Code Quality and Copilot Closes #22009 --- docs/INTERNALS.md | 6 +-- docs/examples/httpput-postfields.c | 2 +- .../opts/CURLOPT_INTERLEAVEFUNCTION.md | 2 +- lib/altsvc.c | 2 +- lib/cf-https-connect.c | 2 +- lib/connect.c | 2 +- lib/curl_config-cmake.h.in | 2 +- lib/curl_endian.c | 6 +-- lib/curl_ntlm_core.c | 4 +- lib/curl_setup.h | 4 +- lib/ftp.c | 4 +- lib/hsts.c | 2 +- lib/ldap.c | 4 +- lib/mime.c | 2 +- lib/peer.c | 6 +-- lib/pop3.c | 2 +- lib/proxy.c | 4 +- lib/proxy.h | 10 ++--- lib/smb.c | 2 +- lib/socks.c | 10 ++--- lib/socks_gssapi.c | 8 ++-- lib/socks_sspi.c | 8 ++-- lib/telnet.c | 30 ++++++-------- lib/urlapi.c | 2 +- lib/vquic/cf-ngtcp2-proxy.c | 2 +- lib/vssh/libssh.c | 2 +- lib/vssh/libssh2.c | 2 +- lib/vtls/schannel.c | 8 ++-- lib/vtls/vtls.h | 2 +- m4/curl-compilers.m4 | 4 +- projects/OS400/curlmain.c | 2 +- scripts/badwords.txt | 2 + scripts/contrithanks.sh | 8 ++-- scripts/top-complexity | 2 +- scripts/top-length | 2 +- tests/data/test1063 | 2 +- tests/data/test1130 | 2 +- tests/data/test1131 | 2 +- tests/data/test1238 | 2 +- tests/data/test1349 | 4 +- tests/data/test1350 | 4 +- tests/data/test1351 | 4 +- tests/data/test1352 | 4 +- tests/data/test1353 | 4 +- tests/data/test1412 | 2 +- tests/data/test1513 | 2 +- tests/data/test1515 | 2 +- tests/data/test153 | 2 +- tests/data/test1555 | 2 +- tests/data/test1628 | 2 +- tests/data/test1631 | 4 +- tests/data/test1632 | 4 +- tests/data/test2045 | 4 +- tests/data/test2206 | 2 +- tests/data/test2207 | 2 +- tests/data/test2302 | 2 +- tests/data/test2713 | 2 +- tests/data/test2714 | 2 +- tests/data/test2715 | 2 +- tests/data/test284 | 4 +- tests/data/test286 | 6 +-- tests/data/test388 | 2 +- tests/data/test399 | 2 +- tests/data/test741 | 2 +- tests/data/test743 | 2 +- tests/data/test744 | 2 +- tests/data/test830 | 2 +- tests/data/test831 | 2 +- tests/data/test832 | 2 +- tests/data/test844 | 2 +- tests/data/test845 | 2 +- tests/data/test849 | 2 +- tests/data/test856 | 2 +- tests/data/test876 | 2 +- tests/data/test877 | 2 +- tests/data/test878 | 2 +- tests/data/test889 | 2 +- tests/data/test890 | 2 +- tests/data/test893 | 2 +- tests/data/test932 | 2 +- tests/data/test933 | 2 +- tests/data/test934 | 2 +- tests/data/test948 | 2 +- tests/data/test949 | 2 +- tests/data/test954 | 2 +- tests/ech_tests.sh | 4 +- tests/libtest/cli_hx_download.c | 2 +- tests/libtest/first.h | 2 +- tests/libtest/lib1507.c | 4 +- tests/libtest/lib1514.c | 10 ++--- tests/libtest/lib1517.c | 12 +++--- tests/libtest/lib1518.c | 2 +- tests/libtest/lib1525.c | 2 +- tests/libtest/lib1526.c | 2 +- tests/libtest/lib1527.c | 2 +- tests/libtest/lib1554.c | 6 +-- tests/libtest/lib1557.c | 2 +- tests/libtest/lib1560.c | 8 ++-- tests/libtest/lib1588.c | 2 +- tests/libtest/lib1591.c | 2 +- tests/libtest/lib1592.c | 24 +++++------ tests/libtest/lib1598.c | 2 +- tests/libtest/lib1648.c | 2 +- tests/libtest/lib1939.c | 2 +- tests/libtest/lib2023.c | 2 +- tests/libtest/lib2032.c | 2 +- tests/libtest/lib2405.c | 4 +- tests/libtest/lib3034.c | 2 +- tests/libtest/lib3102.c | 2 +- tests/libtest/lib3207.c | 6 +-- tests/libtest/lib500.c | 2 +- tests/libtest/lib508.c | 12 +++--- tests/libtest/lib510.c | 2 +- tests/libtest/lib513.c | 2 +- tests/libtest/lib514.c | 2 +- tests/libtest/lib517.c | 6 +-- tests/libtest/lib518.c | 6 +-- tests/libtest/lib525.c | 2 +- tests/libtest/lib526.c | 2 +- tests/libtest/lib537.c | 10 ++--- tests/libtest/lib539.c | 2 +- tests/libtest/lib554.c | 2 +- tests/libtest/lib571.c | 2 +- tests/libtest/lib578.c | 2 +- tests/libtest/lib579.c | 2 +- tests/libtest/lib599.c | 2 +- tests/libtest/lib643.c | 10 ++--- tests/libtest/lib650.c | 2 +- tests/libtest/lib651.c | 2 +- tests/libtest/lib652.c | 2 +- tests/libtest/lib654.c | 10 ++--- tests/libtest/lib666.c | 2 +- tests/libtest/lib667.c | 8 ++-- tests/libtest/lib668.c | 3 +- tests/libtest/lib753.c | 4 +- tests/libtest/lib758.c | 2 +- tests/libtest/testutil.c | 2 +- tests/libtest/testutil.h | 2 +- tests/processhelp.pm | 15 ++++--- tests/runner.pm | 20 +++++----- tests/runtests.pl | 26 ++++++------ tests/server/getpart.c | 8 ++-- tests/server/rtspd.c | 16 ++++---- tests/server/sockfilt.c | 22 +++++----- tests/server/sws.c | 26 ++++++------ tests/server/tftpd.c | 2 +- tests/server/util.c | 10 ++--- tests/test1222.pl | 2 +- tests/testutil.pm | 2 +- tests/unit/unit1300.c | 40 +++++++++---------- tests/unit/unit1305.c | 4 +- tests/unit/unit1603.c | 2 +- tests/unit/unit1609.c | 7 ++-- tests/unit/unit1652.c | 2 +- tests/unit/unit1661.c | 6 +-- tests/unit/unit1674.c | 2 +- tests/unit/unit3205.c | 2 +- tests/unit/unit3300.c | 8 ++-- 158 files changed, 357 insertions(+), 366 deletions(-) diff --git a/docs/INTERNALS.md b/docs/INTERNALS.md index 4fb876d21c..73d4d7b9b8 100644 --- a/docs/INTERNALS.md +++ b/docs/INTERNALS.md @@ -24,7 +24,7 @@ want it to remain functional and buildable with these and later versions ## Dependencies -We aim to support these or later versions. +We aim to support these or later versions: - brotli 1.0.0 (2017-09-21) - c-ares 1.16.0 (2020-03-13) @@ -49,9 +49,9 @@ We aim to support these or later versions. When writing code (mostly for generating stuff included in release tarballs) we use a few "build tools" and we make sure that we remain functional with -these versions: +these or later versions: -- clang-tidy 17.0.0 (2023-09-19), recommended: 19.1.0 or later (2024-09-17) +- clang-tidy 17.0.0 (2023-09-19), recommended: 19.1.0 (2024-09-17) - cmake 3.18 (2020-07-15) - GNU autoconf 2.59 (2003-11-06) - GNU automake 1.7 (2002-09-25) diff --git a/docs/examples/httpput-postfields.c b/docs/examples/httpput-postfields.c index caa0acfae5..602190d9f6 100644 --- a/docs/examples/httpput-postfields.c +++ b/docs/examples/httpput-postfields.c @@ -40,7 +40,7 @@ static const char olivertwist[] = "all events; the item of mortality whose name is prefixed"; /* ... to the head of this chapter. String cut off to stick within the C90 - 509 byte limit. */ + 509-byte limit. */ /* * This example shows an HTTP PUT operation that sends a fixed buffer with diff --git a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.md b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.md index 884c23fc89..8cfe40406d 100644 --- a/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_INTERLEAVEFUNCTION.md @@ -38,7 +38,7 @@ interleaved RTP data. This function gets called for each $ block and therefore contains exactly one upper-layer protocol unit (e.g. one RTP packet). curl writes the interleaved header as well as the included data for each call. The first byte is always an ASCII dollar sign. The dollar sign is followed by a -one byte channel identifier and then a 2 byte integer length in network byte +one-byte channel identifier and then a 2-byte integer length in network byte order. See RFC 2326 Section 10.12 for more information on how RTP interleaving behaves. If unset or set to NULL, curl uses the default write function. diff --git a/lib/altsvc.c b/lib/altsvc.c index 0cbee17fed..80913d9a1d 100644 --- a/lib/altsvc.c +++ b/lib/altsvc.c @@ -149,7 +149,7 @@ static struct altsvc *altsvc_create(struct Curl_str *srchost, static void altsvc_append(struct altsvcinfo *asi, struct altsvc *as) { while(Curl_llist_count(&asi->list) >= MAX_ALTSVC_ENTRIES) { - /* It's full. Remove the first entry in the list */ + /* It is full. Remove the first entry in the list */ struct Curl_llist_node *e = Curl_llist_head(&asi->list); struct altsvc *oldas = Curl_node_elem(e); Curl_node_remove(e); diff --git a/lib/cf-https-connect.c b/lib/cf-https-connect.c index 461797152f..2ee96c86b1 100644 --- a/lib/cf-https-connect.c +++ b/lib/cf-https-connect.c @@ -309,7 +309,7 @@ static enum alpnid cf_hc_get_httpsrr_alpn(struct Curl_cfilter *cf, if(Curl_httpsrr_applicable(data, rr) && !rr->no_def_alpn) { for(i = 0; i < CURL_ARRAYSIZE(rr->alpns); ++i) { enum alpnid alpn_rr = (enum alpnid)rr->alpns[i]; - if(alpn_rr == not_this_one) /* don't want this one */ + if(alpn_rr == not_this_one) /* do not want this one */ continue; switch(alpn_rr) { case ALPN_h3: diff --git a/lib/connect.c b/lib/connect.c index 0e864eca1e..1292972306 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -469,7 +469,7 @@ static CURLcode cf_setup_add_origin_filters(struct Curl_cfilter *cf, #if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3) && \ !defined(CURL_DISABLE_PROXY) - /* Wanting QUIC with a HTTP tunneling filter, we now need to add + /* Wanting QUIC with an HTTP tunneling filter, we now need to add * the QUIC filter on top. Without tunneling, this has already * happened in the Happy Eyeball filter. */ if(ctx->transport == TRNSPRT_QUIC && diff --git a/lib/curl_config-cmake.h.in b/lib/curl_config-cmake.h.in index 5c7fdd670b..6db19c22eb 100644 --- a/lib/curl_config-cmake.h.in +++ b/lib/curl_config-cmake.h.in @@ -261,7 +261,7 @@ /* Define to 1 if you have a working getaddrinfo function. */ #cmakedefine HAVE_GETADDRINFO 1 -/* Define to 1 if the getaddrinfo function is threadsafe. */ +/* Define to 1 if the getaddrinfo function is thread-safe. */ #cmakedefine HAVE_GETADDRINFO_THREADSAFE 1 /* Define to 1 if you have the `geteuid' function. */ diff --git a/lib/curl_endian.c b/lib/curl_endian.c index 864b411b68..b3689417a4 100644 --- a/lib/curl_endian.c +++ b/lib/curl_endian.c @@ -34,7 +34,7 @@ * * Parameters: * - * buf [in] - A pointer to a 2 byte buffer. + * buf [in] - A pointer to a 2-byte buffer. * * Returns the integer. */ @@ -53,7 +53,7 @@ unsigned short Curl_read16_le(const unsigned char *buf) * * Parameters: * - * buf [in] - A pointer to a 4 byte buffer. + * buf [in] - A pointer to a 4-byte buffer. * * Returns the integer. */ @@ -72,7 +72,7 @@ unsigned int Curl_read32_le(const unsigned char *buf) * * Parameters: * - * buf [in] - A pointer to a 2 byte buffer. + * buf [in] - A pointer to a 2-byte buffer. * * Returns the integer. */ diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index e774d282f7..58a446c95d 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -292,8 +292,8 @@ static bool encrypt_des(const unsigned char *in, unsigned char *out, #endif /* crypto backends */ /* - * takes a 21 byte array and treats it as 3 56-bit DES keys. The - * 8 byte plaintext is encrypted with each key and the resulting 24 + * takes a 21-byte array and treats it as 3 56-bit DES keys. The + * 8-byte plaintext is encrypted with each key and the resulting 24 * bytes are stored in the results array. */ void Curl_ntlm_core_lm_resp(const unsigned char *keys, diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 0bbf717c89..861e07649d 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -219,7 +219,7 @@ /* please, do it beyond the point further indicated in this file. */ /* ================================================================ */ -/* Give calloc a chance to be dragging in early, so we do not redefine */ +/* Give calloc a chance to be included early, so we do not redefine */ #ifdef HAVE_THREADS_POSIX # include #endif @@ -461,7 +461,7 @@ # undef HAVE_FCNTL # undef HAVE_FCNTL_O_NONBLOCK # else - /* use libc networking and hence close() and fnctl() */ + /* use libc networking and hence close() and fcntl() */ # undef HAVE_CLOSESOCKET_CAMEL # undef HAVE_IOCTLSOCKET_CAMEL # endif diff --git a/lib/ftp.c b/lib/ftp.c index 7f48c8a262..05d17064a0 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -4462,8 +4462,8 @@ bool ftp_conns_match(struct connectdata *needle, struct connectdata *conn) return FALSE; /* A mismatch on `use_ssl` MUST have been found in connection matching * before we come here. This is a check on MAYBE/MUST use of STARTTLS and - * it only works on ftp. But imap/smtp etc have the same `use_ssl` and - * no extra match like ftp. We lack tests in this area, so let ftp fail + * it only works on FTP. But IMAP/SMTP etc have the same `use_ssl` and + * no extra match like FTP. We lack tests in this area, so let FTP fail * loudly here to help other cases. */ if(nftpc->use_ssl > cftpc->use_ssl) { DEBUGASSERT(0); diff --git a/lib/hsts.c b/lib/hsts.c index 0884ef5893..b8745a5195 100644 --- a/lib/hsts.c +++ b/lib/hsts.c @@ -96,7 +96,7 @@ void Curl_hsts_cleanup(struct hsts **hp) static void hsts_append(struct hsts *h, struct stsentry *sts) { if(Curl_llist_count(&h->list) == MAX_HSTS_ENTRIES) { - /* It's full. Remove the first entry in the list */ + /* It is full. Remove the first entry in the list */ struct Curl_llist_node *e = Curl_llist_head(&h->list); struct stsentry *oldsts = Curl_node_elem(e); Curl_node_remove(e); diff --git a/lib/ldap.c b/lib/ldap.c index ab1f118ec7..6b93d345b3 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -264,7 +264,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) int ldap_proto = LDAP_VERSION3; int ldap_ssl = 0; #ifdef LDAP_OPT_NETWORK_TIMEOUT - struct timeval ldap_timeout = {10, 0}; /* 10 sec connection/search timeout */ + struct timeval ldap_timeout = { 10, 0 }; /* 10s connection/search timeout */ #endif #ifdef USE_WIN32_LDAP TCHAR *host = NULL; @@ -463,9 +463,7 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done) name = curlx_convert_tchar_to_UTF8(dn); if(!name) { ldap_memfree(dn); - result = CURLE_OUT_OF_MEMORY; - goto quit; } #else diff --git a/lib/mime.c b/lib/mime.c index ec2900cc18..077e599e43 100644 --- a/lib/mime.c +++ b/lib/mime.c @@ -1940,7 +1940,7 @@ static CURLcode cr_mime_read(struct Curl_easy *data, else if(blen <= 4) { /* Curl_mime_read() may go into an infinite loop when reading * via a base64 encoder, as it stalls when the read buffer is too small - * to contain a complete 3 byte encoding. Read into a larger buffer + * to contain a complete 3-byte encoding. Read into a larger buffer * and use that until empty. */ CURL_TRC_READ(data, "cr_mime_read(len=%zu), small read, using tmp", blen); nread = Curl_mime_read(tmp, 1, sizeof(tmp), ctx->part); diff --git a/lib/peer.c b/lib/peer.c index aa3ac5244a..d559d1dee3 100644 --- a/lib/peer.c +++ b/lib/peer.c @@ -428,7 +428,7 @@ CURLcode Curl_peer_from_url(CURLU *uh, struct Curl_easy *data, } if(scopeid_override) - /* Override any scope id from an url zone. */ + /* Override any scope id from an URL zone. */ pp.scopeid = scopeid_override; else { if(curl_url_get(uh, CURLUPART_ZONEID, &zoneid, 0) == @@ -593,7 +593,7 @@ CURLcode Curl_peer_from_proxy_url(CURLU *uh, result = CURLE_OUT_OF_MEMORY; goto out; } - /* url came without scheme, the passed `proxytype` determines it */ + /* URL came without scheme, the passed `proxytype` determines it */ switch(proxytype) { case CURLPROXY_HTTP: case CURLPROXY_HTTP_1_0: @@ -666,7 +666,7 @@ CURLcode Curl_peer_from_proxy_url(CURLU *uh, curlx_free(portptr); } else { - /* No port in url, take the set one or the scheme's default */ + /* No port in URL, take the set one or the scheme's default */ if(data->set.proxyport) pp.port = data->set.proxyport; else diff --git a/lib/pop3.c b/lib/pop3.c index 8a62c85be4..d609b4c2b3 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -585,7 +585,7 @@ static CURLcode pop3_perform_apop(struct Curl_easy *data, /* Finalise the digest */ Curl_MD5_final(ctxt, digest); - /* Convert the calculated 16 octet digest into a 32 byte hex string */ + /* Convert the calculated 16 octet digest into a 32-byte hex string */ for(i = 0; i < MD5_DIGEST_LEN; i++) curl_msnprintf(&secret[2 * i], 3, "%02x", digest[i]); diff --git a/lib/proxy.c b/lib/proxy.c index afd313a107..920dc45598 100644 --- a/lib/proxy.c +++ b/lib/proxy.c @@ -372,7 +372,7 @@ static CURLcode parse_proxy(struct Curl_easy *data, char *proxypasswd = NULL; char *scheme = NULL; CURLcode result = CURLE_OK; - /* Set the start proxy type for url scheme guessing */ + /* Set the start proxy type for URL scheme guessing */ uint8_t proxytype = for_pre_proxy ? CURLPROXY_SOCKS4 : data->set.proxytype; CURLU *uhp = curl_url(); CURLUcode uc; @@ -588,7 +588,7 @@ CURLcode Curl_proxy_init_conn(struct Curl_easy *data, case CURLPROXY_SOCKS4A: case CURLPROXY_SOCKS5: case CURLPROXY_SOCKS5_HOSTNAME: - /* Whoops, it's not a HTTP proxy */ + /* Whoops, it is not an HTTP proxy */ if(pre_proxy) { /* and we already have a SOCKS pre-proxy. Cannot have both */ failf(data, "Having a SOCKS pre-proxy and proxy is not " diff --git a/lib/proxy.h b/lib/proxy.h index 7962f612c5..307ee003e6 100644 --- a/lib/proxy.h +++ b/lib/proxy.h @@ -38,17 +38,17 @@ struct proxy_info { uint8_t proxytype; /* what kind of proxy that is in use */ }; -#define CURL_PROXY_IS_HTTPS(t) \ +#define CURL_PROXY_IS_HTTPS(t) \ (((t) == CURLPROXY_HTTPS) || \ ((t) == CURLPROXY_HTTPS2) || \ ((t) == CURLPROXY_HTTPS3)) -#define CURL_PROXY_IS_HTTP(t) \ - (((t) == CURLPROXY_HTTP) || \ +#define CURL_PROXY_IS_HTTP(t) \ + (((t) == CURLPROXY_HTTP) || \ ((t) == CURLPROXY_HTTP_1_0)) -#define CURL_PROXY_IS_ANY_HTTP(t) \ - (CURL_PROXY_IS_HTTP(t) || \ +#define CURL_PROXY_IS_ANY_HTTP(t) \ + (CURL_PROXY_IS_HTTP(t) || \ CURL_PROXY_IS_HTTPS(t)) CURLcode Curl_proxy_init_conn(struct Curl_easy *data, diff --git a/lib/smb.c b/lib/smb.c index 397ea6eb22..c06ca14fb3 100644 --- a/lib/smb.c +++ b/lib/smb.c @@ -1231,4 +1231,4 @@ const struct Curl_protocol Curl_protocol_smb = { ZERO_NULL, /* follow */ }; -#endif /* CURL_ENABLE_SMB && USE_CURL_NTLM_CORE && SIZEOF_CURL_OFF_T > 4 */ +#endif /* CURL_ENABLE_SMB && USE_CURL_NTLM_CORE */ diff --git a/lib/socks.c b/lib/socks.c index 5b24741a24..9ae8cd7969 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -553,7 +553,7 @@ process_state: FALLTHROUGH(); case SOCKS4_ST_RECV: - /* Receive 8 byte response */ + /* Receive 8-byte response */ presult = socks_recv(sx, cf, data, 8, &done); if(presult) return socks_failed(sx, cf, data, presult); @@ -799,7 +799,7 @@ static CURLproxycode socks5_req1_init(struct socks_ctx *sx, DEBUGASSERT(hostname_len <= 255); desttype = 3; destination = (const unsigned char *)sx->dest->hostname; - destlen = (unsigned char)hostname_len; /* one byte length */ + destlen = (unsigned char)hostname_len; /* 1-byte length */ } req[3] = desttype; @@ -959,9 +959,9 @@ static CURLproxycode socks5_recv_resp1(struct socks_ctx *sx, +----+-----+-------+------+----------+----------+ ATYP: - o IPv4 address: 0x01, BND.ADDR = 4 byte - o domain name: 0x03, BND.ADDR = [ 1 byte length, string ] - o IPv6 address: 0x04, BND.ADDR = 16 byte + o IPv4 address: 0x01, BND.ADDR = 4-byte + o domain name: 0x03, BND.ADDR = [ 1-byte length, string ] + o IPv6 address: 0x04, BND.ADDR = 16-byte */ if(resp[0] != 5) { /* version */ failf(data, "SOCKS5 reply has wrong version, version should be 5."); diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c index 002c1b6d37..e10899c7e7 100644 --- a/lib/socks_gssapi.c +++ b/lib/socks_gssapi.c @@ -551,10 +551,10 @@ static CURLcode socks5_gss_negotiate_enc(struct Curl_cfilter *cf, gss_recv_token.length = 0; } - infof(data, "SOCKS5 access with%s protection granted.", - (socksreq[0] == 0) ? "out GSS-API data" : - ((socksreq[0] == 1) ? " GSS-API integrity" : - " GSS-API confidentiality")); + infof(data, "SOCKS5 access %s protection granted.", + (socksreq[0] == 0) ? "without GSS-API data" : + ((socksreq[0] == 1) ? "with GSS-API integrity" : + "with GSS-API confidentiality")); conn->socks5_gssapi_enctype = socksreq[0]; if(socksreq[0] == 0) diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c index c4e0bb7d5d..10a8be1773 100644 --- a/lib/socks_sspi.c +++ b/lib/socks_sspi.c @@ -457,10 +457,10 @@ static CURLcode socks5_sspi_encrypt(struct Curl_cfilter *cf, } curlx_free(sspi_w_token[0].pvBuffer); - infof(data, "SOCKS5 access with%s protection granted BUT NOT USED.", - (socksreq[0] == 0) ? "out GSS-API data" : - ((socksreq[0] == 1) ? " GSS-API integrity" : - " GSS-API confidentiality")); + infof(data, "SOCKS5 access %s protection granted BUT NOT USED.", + (socksreq[0] == 0) ? "without GSS-API data" : + ((socksreq[0] == 1) ? "with GSS-API integrity" : + "with GSS-API confidentiality")); cf->conn->socks5_gssapi_enctype = socksreq[0]; return CURLE_OK; diff --git a/lib/telnet.c b/lib/telnet.c index fbd7d5418d..2870d7e2c9 100644 --- a/lib/telnet.c +++ b/lib/telnet.c @@ -196,20 +196,15 @@ static CURLcode init_telnet(struct Curl_easy *data) tn->us_preferred[CURL_TELOPT_SGA] = CURL_YES; tn->him_preferred[CURL_TELOPT_SGA] = CURL_YES; - /* To be compliant with previous releases of libcurl - we enable this option by default. This behavior - can be changed thanks to the "BINARY" option in - CURLOPT_TELNETOPTIONS - */ + /* To be compliant with previous releases of libcurl we enable this option + by default. This behavior can be changed with the "BINARY" option in + CURLOPT_TELNETOPTIONS */ tn->us_preferred[CURL_TELOPT_BINARY] = CURL_YES; tn->him_preferred[CURL_TELOPT_BINARY] = CURL_YES; - /* We must allow the server to echo what we sent - but it is not necessary to request the server - to do so (it might forces the server to close - the connection). Hence, we ignore ECHO in the - negotiate function - */ + /* We must allow the server to echo what we sent but it is not necessary + to request the server to do so (it might force the server to close + the connection). Hence, we ignore ECHO in the negotiate function */ tn->him_preferred[CURL_TELOPT_ECHO] = CURL_YES; /* Set the subnegotiation fields to send information after negotiation @@ -217,12 +212,11 @@ static CURLcode init_telnet(struct Curl_easy *data) Default values are (0,0) initialized by calloc. According to the RFC1013 it is valid: - A value equal to zero is acceptable for the width (or height), - and means that no character width (or height) is being sent. - In this case, the width (or height) that will be assumed by the - Telnet server is operating system specific (it will probably be - based upon the terminal type information that may have been sent - using the TERMINAL TYPE Telnet option). */ + A value equal to zero is acceptable for the width (or height), and means + that no character width (or height) is being sent. In this case, the width + (or height) that will be assumed by the Telnet server is operating system + specific (it will probably be based upon the terminal type information + that may have been sent using the TERMINAL TYPE Telnet option). */ tn->subnegotiation[CURL_TELOPT_NAWS] = CURL_YES; return Curl_meta_set(data, CURL_META_TELNET_EASY, tn, telnet_easy_dtor); @@ -1278,7 +1272,7 @@ static CURLcode telnet_do(struct Curl_easy *data, bool *done) return CURLE_RECV_ERROR; } - /* The get the Windows file handle for stdin */ + /* Then get the Windows file handle for stdin */ stdin_handle = GetStdHandle(STD_INPUT_HANDLE); /* Create the list of objects to wait for */ diff --git a/lib/urlapi.c b/lib/urlapi.c index 7a926debb6..60e5c7f7e3 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -883,7 +883,7 @@ UNITTEST CURLUcode parse_file(const char *url, size_t urllen, CURLU *u, pathlen = urllen - 5; /* RFC 8089: file-hier-part = ( "//" auth-path ) / local-path, where - local-path also starts with a "/". So reject anything that doesn't + local-path also starts with a "/". So reject anything that does not start with at least one "/" */ if(path[0] != '/') return CURLUE_BAD_FILE_URL; diff --git a/lib/vquic/cf-ngtcp2-proxy.c b/lib/vquic/cf-ngtcp2-proxy.c index 9481bd038d..fd2840890f 100644 --- a/lib/vquic/cf-ngtcp2-proxy.c +++ b/lib/vquic/cf-ngtcp2-proxy.c @@ -1167,7 +1167,7 @@ static CURLcode cf_h3_proxy_connect(struct Curl_cfilter *cf, CF_DATA_SAVE(save, cf, data); data_saved = TRUE; - /* At this point the QUIC is connected, but the proxy isn't connected */ + /* At this point the QUIC is connected, but the proxy is not connected */ result = cf_h3_proxy_tunnel(cf, data, ts, done); out: diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index 532b4b0706..e4071caa46 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -2611,7 +2611,7 @@ static CURLcode myssh_connect(struct Curl_easy *data, bool *done) sshc->ssh_session = ssh_new(); if(!sshc->ssh_session) { - failf(data, "Failure initialising ssh session"); + failf(data, "Failure initializing ssh session"); return CURLE_FAILED_INIT; } diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c index 06cbd68309..7868c385f4 100644 --- a/lib/vssh/libssh2.c +++ b/lib/vssh/libssh2.c @@ -3486,7 +3486,7 @@ static CURLcode ssh_connect(struct Curl_easy *data, bool *done) my_libssh2_realloc, data); if(!sshc->ssh_session) { - failf(data, "Failure initialising ssh session"); + failf(data, "Failure initializing ssh session"); return CURLE_FAILED_INIT; } diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 3f1324f157..3e871227aa 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -167,7 +167,7 @@ static CURLcode schannel_set_ssl_version_min_max(DWORD *enabled_protocols, VERSION_GREATER_THAN_EQUAL)) { ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_3; } - else /* Windows 10 and older */ + else /* Windows 10 or older */ ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_2; break; @@ -192,8 +192,8 @@ static CURLcode schannel_set_ssl_version_min_max(DWORD *enabled_protocols, *enabled_protocols |= SP_PROT_TLS1_3_CLIENT; break; } - else { /* Windows 10 and older */ - failf(data, "schannel: TLS 1.3 not supported on Windows prior to 11"); + else { /* Windows 10 or older */ + failf(data, "schannel: TLS 1.3 not supported on Windows 10 or older"); return CURLE_SSL_CONNECT_ERROR; } } @@ -988,7 +988,7 @@ static CURLcode schannel_connect_step1(struct Curl_cfilter *cf, } /* Schannel InitializeSecurityContext: - https://learn.microsoft.com/windows/win32/api/rrascfg/nn-rrascfg-ieapproviderconfig + https://learn.microsoft.com/windows/win32/api/sspi/nf-sspi-initializesecuritycontextw At the moment we do not pass inbuf unless we are using ALPN since we only use it for that, and WINE (for which we currently disable ALPN) is giving diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h index 4bf99ad30c..96cb7d15ed 100644 --- a/lib/vtls/vtls.h +++ b/lib/vtls/vtls.h @@ -156,7 +156,7 @@ CURLcode Curl_pin_peer_pubkey(struct Curl_easy *data, bool Curl_ssl_cert_status_request(void); /* The maximum size of the SSL channel binding is 85 bytes, as defined in - * RFC 5929, Section 4.1. The 'tls-server-end-point:' prefix is 21 bytes long, + * RFC 5929, Section 4.1. The 'tls-server-end-point:' prefix is 21 bytes, * and SHA-512 is the longest supported hash algorithm, with a digest length of * 64 bytes. * The maximum size of the channel binding is therefore 21 + 64 = 85 bytes. diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 36688bcff7..8b7da20caa 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -68,7 +68,7 @@ AC_DEFUN([CURL_CHECK_COMPILER], [ *** *** If you wish to help the curl project to better support your compiler *** you can report this and the required info on the libcurl development -*** mailing list: https://lists.haxx.selistinfo/curl-library/ +*** mailing list: https://lists.haxx.se/listinfo/curl-library/ *** _EOF fi @@ -1260,7 +1260,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ tmp_CPPFLAGS="$tmp_CPPFLAGS -Wp64" dnl Enable warnings for questionable pointer arithmetic tmp_CPPFLAGS="$tmp_CPPFLAGS -Wpointer-arith" - dnl Check for function return typw issues + dnl Check for function return type issues tmp_CPPFLAGS="$tmp_CPPFLAGS -Wreturn-type" dnl Warn on variable declarations hiding a previous one tmp_CPPFLAGS="$tmp_CPPFLAGS -Wshadow" diff --git a/projects/OS400/curlmain.c b/projects/OS400/curlmain.c index 649d98a17d..690e8c6221 100644 --- a/projects/OS400/curlmain.c +++ b/projects/OS400/curlmain.c @@ -59,7 +59,7 @@ int main(int argc, char **argv) size_t inbytesleft; size_t outbytesleft; char dummybuf[128]; - /* To/From codes are 32 byte long strings with + /* To/From codes are 32-byte strings with reserved fields initialized to ZEROs */ const char tocode[32] = { "IBMCCSID01208" }; /* Use UTF-8. */ const char fromcode[32] = { "IBMCCSID000000000010" }; diff --git a/scripts/badwords.txt b/scripts/badwords.txt index c55fcbe19f..2651a48598 100644 --- a/scripts/badwords.txt +++ b/scripts/badwords.txt @@ -112,6 +112,7 @@ will:rewrite to present tense 32-bits:32 bits 64-bits:64 bits initialise:initialize +initialising:initializing very:rephrase using an alternative word just:rephrase using an alternative word simply:rephrase using an alternative word @@ -131,3 +132,4 @@ with with:with ---Curl Corporation ---:lib/:will ---:src/:will +---:tests/data/:file name diff --git a/scripts/contrithanks.sh b/scripts/contrithanks.sh index 2b85d14d08..85f382b755 100755 --- a/scripts/contrithanks.sh +++ b/scripts/contrithanks.sh @@ -36,11 +36,11 @@ if test "$start" = "-h"; then exit fi if test "$start" = "stdout"; then - # output the names on stdout - use_stdout="yes" - start="" + # output the names on stdout + use_stdout="yes" + start="" else - use_stdout="no"; + use_stdout="no" fi if test -z "$start"; then start=$(git tag --sort=taggerdate | grep "^curl-" | tail -1) diff --git a/scripts/top-complexity b/scripts/top-complexity index e6cd22956b..7ad84f29dd 100755 --- a/scripts/top-complexity +++ b/scripts/top-complexity @@ -96,7 +96,7 @@ my $alllines = 0; # 142 417 809 1677 1305 src/tool_getparam.c(1677): getparameter for my $l (@output) { chomp $l; - if($l =~/^(\d+)\t\d+\t\d+\t\d+\t(\d+)\t([^\(]+).*: ([^ ]*)/) { + if($l =~ /^(\d+)\t\d+\t\d+\t\d+\t(\d+)\t([^\(]+).*: ([^ ]*)/) { my ($score, $len, $path, $func) = ($1, $2, $3, $4); my $allow = 0; diff --git a/scripts/top-length b/scripts/top-length index 10dabde39d..221c48d0b1 100755 --- a/scripts/top-length +++ b/scripts/top-length @@ -96,7 +96,7 @@ my $alllines = 0; # 142 417 809 1677 1305 src/tool_getparam.c(1677): getparameter for my $l (@output) { chomp $l; - if($l =~/^(\d+)\t\d+\t\d+\t\d+\t(\d+)\t([^\(]+).*: ([^ ]*)/) { + if($l =~ /^(\d+)\t\d+\t\d+\t\d+\t(\d+)\t([^\(]+).*: ([^ ]*)/) { my ($score, $length, $path, $func) = ($1, $2, $3, $4); my $allow = 0; diff --git a/tests/data/test1063 b/tests/data/test1063 index 28b97be29f..1ac6411492 100644 --- a/tests/data/test1063 +++ b/tests/data/test1063 @@ -20,7 +20,7 @@ Largefile Invalid large X- range on a file:// -# This range value is 2**32 + 7, which will be truncated to the valid value 7 +# This range value is 2**32 + 7, which is truncated to the valid value 7 # if the large file support is not working correctly -r 4294967303- file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt diff --git a/tests/data/test1130 b/tests/data/test1130 index a23c9d314b..abbfc499a1 100644 --- a/tests/data/test1130 +++ b/tests/data/test1130 @@ -32,7 +32,7 @@ Content-Type: text/html # We use skip to make the test server never read the full payload off # the socket and instead return the response at once. In actuality, the -# long --expect100-timeout means that it will never get a chance to read this. +# long --expect100-timeout means that it never gets a chance to read this. skip: 100 diff --git a/tests/data/test1131 b/tests/data/test1131 index 85e0604741..855121d278 100644 --- a/tests/data/test1131 +++ b/tests/data/test1131 @@ -32,7 +32,7 @@ FAILURE2 # We use skip to make the test server never read the full payload off # the socket and instead return the response at once. In actuality, the -# long --expect100-timeout means that it will never get a chance to read this. +# long --expect100-timeout means that it never gets a chance to read this. skip: 100 diff --git a/tests/data/test1238 b/tests/data/test1238 index 9c2e22091b..bb9b5d2b2b 100644 --- a/tests/data/test1238 +++ b/tests/data/test1238 @@ -14,7 +14,7 @@ DELAY writedelay: 2000 -# ~1200 bytes (so that they do not fit in two 512 byte chunks) +# ~1200 bytes (so that they do not fit in two 512-byte chunks) 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 diff --git a/tests/data/test1349 b/tests/data/test1349 index 04a6680635..ae19f87a7c 100644 --- a/tests/data/test1349 +++ b/tests/data/test1349 @@ -47,8 +47,8 @@ fooo mooo -# The final "221 bye bye baby" response to QUIT will not be recorded -# since that is not considered part of this particular transfer! +# The final "221 bye bye baby" response to QUIT is not recorded +# since that is not considered part of this particular transfer. 220- _ _ ____ _ 220- ___| | | | _ \| | diff --git a/tests/data/test1350 b/tests/data/test1350 index 2520df1dab..8335bda811 100644 --- a/tests/data/test1350 +++ b/tests/data/test1350 @@ -47,8 +47,8 @@ fooo mooo -# The final "221 bye bye baby" response to QUIT will not be recorded -# since that is not considered part of this particular transfer! +# The final "221 bye bye baby" response to QUIT is not recorded +# since that is not considered part of this particular transfer. 220- _ _ ____ _ 220- ___| | | | _ \| | diff --git a/tests/data/test1351 b/tests/data/test1351 index 8351e49c68..525b23fdb0 100644 --- a/tests/data/test1351 +++ b/tests/data/test1351 @@ -48,8 +48,8 @@ fooo mooo -# The final "221 bye bye baby" response to QUIT will not be recorded -# since that is not considered part of this particular transfer! +# The final "221 bye bye baby" response to QUIT is not recorded +# since that is not considered part of this particular transfer. 220- _ _ ____ _ 220- ___| | | | _ \| | diff --git a/tests/data/test1352 b/tests/data/test1352 index 4ff3222c61..725e63fee3 100644 --- a/tests/data/test1352 +++ b/tests/data/test1352 @@ -48,8 +48,8 @@ fooo mooo -# The final "221 bye bye baby" response to QUIT will not be recorded -# since that is not considered part of this particular transfer! +# The final "221 bye bye baby" response to QUIT is not recorded +# since that is not considered part of this particular transfer. 220- _ _ ____ _ 220- ___| | | | _ \| | diff --git a/tests/data/test1353 b/tests/data/test1353 index b2ede58f3b..ee05e78120 100644 --- a/tests/data/test1353 +++ b/tests/data/test1353 @@ -47,8 +47,8 @@ fooo mooo -# The final "221 bye bye baby" response to QUIT will not be recorded -# since that is not considered part of this particular transfer! +# The final "221 bye bye baby" response to QUIT is not recorded +# since that is not considered part of this particular transfer. 220- _ _ ____ _ 220- ___| | | | _ \| | diff --git a/tests/data/test1412 b/tests/data/test1412 index babb42f29b..ba9165d9f3 100644 --- a/tests/data/test1412 +++ b/tests/data/test1412 @@ -26,7 +26,7 @@ Connection: close This is not the real page -# The second URL will get this response +# The second URL gets this response HTTP/1.1 401 Authorization Required swsclose Server: Apache/1.3.27 (Darwin) PHP/4.1.2 diff --git a/tests/data/test1513 b/tests/data/test1513 index 4b119fca7a..b84183846d 100644 --- a/tests/data/test1513 +++ b/tests/data/test1513 @@ -30,7 +30,7 @@ lib%TESTNUMBER return failure immediately from progress callback -# this server/host will not be used for real +# this server/host is not used for real http://%HOSTIP:%HTTPPORT/%TESTNUMBER diff --git a/tests/data/test1515 b/tests/data/test1515 index 2fca5beb70..2ad5ac0797 100644 --- a/tests/data/test1515 +++ b/tests/data/test1515 @@ -10,7 +10,7 @@ resolve -# Close the connection after the first request. Second request will happen after +# Close the connection after the first request. Second request happens after # the DNS cache timeout elapses and must succeed exactly like the first one. HTTP/1.1 200 OK diff --git a/tests/data/test153 b/tests/data/test153 index b2bd6e220b..e2b8ebf3fb 100644 --- a/tests/data/test153 +++ b/tests/data/test153 @@ -56,7 +56,7 @@ Content-Length: 26 This is not the real page -# The second request to the 1002 section will bounce this one back instead +# The second request to the 1002 section bounces this one back instead # thanks to the swsbounce keyword up there HTTP/1.1 200 OK diff --git a/tests/data/test1555 b/tests/data/test1555 index 2cbbd9b0c6..1212531686 100644 --- a/tests/data/test1555 +++ b/tests/data/test1555 @@ -30,7 +30,7 @@ lib%TESTNUMBER verify api is protected against calls from callbacks -# this server/host will not be used for real +# this server/host is not used for real http://%HOSTIP:%HTTPPORT/%TESTNUMBER diff --git a/tests/data/test1628 b/tests/data/test1628 index d5cf836787..f4f1da5d8d 100644 --- a/tests/data/test1628 +++ b/tests/data/test1628 @@ -27,7 +27,7 @@ proxy http -HTTP PUT from file with weird letters over a HTTP proxy +HTTP PUT from file with weird letters over an HTTP proxy -x http://%HOSTIP:%HTTPPORT http://ssss/ -T %LOGDIR/%TESTNUMBERte[]st.txt diff --git a/tests/data/test1631 b/tests/data/test1631 index 2015fc328a..f0018516d5 100644 --- a/tests/data/test1631 +++ b/tests/data/test1631 @@ -56,8 +56,8 @@ proxy # Verify data after the test has been "shot" -# The second CONNECT will be made to the dynamic port number the FTP server -# opens for us, so we cannot compare with a known pre-existing number! +# The second CONNECT is made to the dynamic port number the FTP server +# opens for us, so we cannot compare with a known pre-existing number. s/((https.proxy):(\d+))/$2:12345/ diff --git a/tests/data/test1632 b/tests/data/test1632 index 76c8bffcba..eda70d0d98 100644 --- a/tests/data/test1632 +++ b/tests/data/test1632 @@ -65,8 +65,8 @@ proxy # Verify data after the test has been "shot" -# The second and third CONNECT will be made to the dynamic port number the FTP -# server opens for us, so we cannot compare with known pre-existing numbers! +# The second and third CONNECTs are made to the dynamic port number the FTP +# server opens for us, so we cannot compare with known pre-existing numbers. s/((https.proxy):(\d+))/$2:12345/ diff --git a/tests/data/test2045 b/tests/data/test2045 index 597deed7f6..dd814abb6c 100644 --- a/tests/data/test2045 +++ b/tests/data/test2045 @@ -11,13 +11,13 @@ FTP # The purpose of this test is to make sure the --proto-default option works # properly. We specify a default protocol of FTP and if the option works properly -# curl will use the FTP protocol. If the option is broken however curl will use +# curl uses the FTP protocol. If the option is broken however curl uses # the HTTP protocol. # In the broken scenario curl would use HTTP to talk to our FTP server. We handle # that by replying with something that both protocols can understand. Our FTP # server allows a custom welcome message, so we use that feature to make an HTTP # reply that contains an FTP reply (think polyglot). In the case of FTP we expect -# curl will return CURLE_WEIRD_SERVER_REPLY so we test for that return code. +# curl to return CURLE_WEIRD_SERVER_REPLY so we test for that return code. REPLY welcome HTTP/1.1 200 OK\r\nContent-Length: 21\r\n\r\n500 Weird FTP Reply diff --git a/tests/data/test2206 b/tests/data/test2206 index 31530221f8..5021c190f7 100644 --- a/tests/data/test2206 +++ b/tests/data/test2206 @@ -15,7 +15,7 @@ hello # Send a PINGRESP (0xD0) with remaining_length=2 in place of the # expected CONNACK. MQTT 3.1.1 s. 3.13.1 requires PINGRESP to have -# remaining_length == 0. Curl must reject this with +# remaining_length == 0. curl must reject this with # CURLE_WEIRD_SERVER_REPLY rather than dispatching to the CONNACK # handler. diff --git a/tests/data/test2207 b/tests/data/test2207 index 2aa3bd2636..61b423059e 100644 --- a/tests/data/test2207 +++ b/tests/data/test2207 @@ -15,7 +15,7 @@ hello # Send a DISCONNECT with remaining_length=2 after the PUBLISH. # MQTT 3.1.1 s. 3.14.1 requires DISCONNECT to have remaining_length == 0. -# Curl must reject this with CURLE_WEIRD_SERVER_REPLY. +# curl must reject this with CURLE_WEIRD_SERVER_REPLY. DISCONNECT-malformed TRUE diff --git a/tests/data/test2302 b/tests/data/test2302 index 397350dc99..396ba16a7e 100644 --- a/tests/data/test2302 +++ b/tests/data/test2302 @@ -6,7 +6,7 @@ WebSockets -# Sends a PING + a 5 byte hello TEXT +# Sends a PING + a 5-byte hello TEXT HTTP/1.1 101 Switching to WebSockets diff --git a/tests/data/test2713 b/tests/data/test2713 index 6ec722ceae..6c50bc72fe 100644 --- a/tests/data/test2713 +++ b/tests/data/test2713 @@ -34,7 +34,7 @@ upgrade # Full list of frames: see 'verify.stdout' below -# A 126 byte long PING +# A 126-byte-long PING HTTP/1.1 101 Switching to WebSockets Server: server/%TESTNUMBER diff --git a/tests/data/test2714 b/tests/data/test2714 index 60c5c6daf7..654004966f 100644 --- a/tests/data/test2714 +++ b/tests/data/test2714 @@ -34,7 +34,7 @@ upgrade # Full list of frames: see 'verify.stdout' below -# A 126 byte long PONG +# A 126-byte-long PONG HTTP/1.1 101 Switching to WebSockets Server: server/%TESTNUMBER diff --git a/tests/data/test2715 b/tests/data/test2715 index 68ea8647ab..4cf4febb35 100644 --- a/tests/data/test2715 +++ b/tests/data/test2715 @@ -34,7 +34,7 @@ upgrade # Full list of frames: see 'verify.stdout' below -# A 126 byte long CLOSE +# A 126-byte-long CLOSE HTTP/1.1 101 Switching to WebSockets Server: server/%TESTNUMBER diff --git a/tests/data/test284 b/tests/data/test284 index 469172a5dc..aa48f4388c 100644 --- a/tests/data/test284 +++ b/tests/data/test284 @@ -11,7 +11,7 @@ TFTP RRQ A chunk of data which exactly fits into -a 512 byte TFTP block, testing a boundary +a 512-byte TFTP block, testing a boundary condition in the TFTP receive code. 789ABCDEF 123456789ABCDEF @@ -47,7 +47,7 @@ condition in the TFTP receive code. tftp -TFTP retrieve of boundary case 512 byte file +TFTP retrieve of boundary case 512-byte file tftp://%HOSTIP:%TFTPPORT//%TESTNUMBER diff --git a/tests/data/test286 b/tests/data/test286 index 9902d160b8..cc9fd7c8f6 100644 --- a/tests/data/test286 +++ b/tests/data/test286 @@ -13,14 +13,14 @@ TFTP WRQ tftp -TFTP send of boundary case 512 byte file +TFTP send of boundary case 512-byte file -T %LOGDIR/test%TESTNUMBER.txt tftp://%HOSTIP:%TFTPPORT// A chunk of data which exactly fits into -a 512 byte TFTP block, testing a boundary +a 512-byte TFTP block, testing a boundary condition in the TFTP transmit code. 89ABCDEF 123456789ABCDEF @@ -54,7 +54,7 @@ condition in the TFTP transmit code. A chunk of data which exactly fits into -a 512 byte TFTP block, testing a boundary +a 512-byte TFTP block, testing a boundary condition in the TFTP transmit code. 89ABCDEF 123456789ABCDEF diff --git a/tests/data/test388 b/tests/data/test388 index 7994eaf8ab..b9f33e2d25 100644 --- a/tests/data/test388 +++ b/tests/data/test388 @@ -56,7 +56,7 @@ Content-Length: 26 This is not the real page -# The second request to the 1002 section will bounce this one back instead +# The second request to the 1002 section bounces this one back instead # thanks to the swsbounce keyword up there HTTP/1.1 200 OK diff --git a/tests/data/test399 b/tests/data/test399 index cc4d0fc474..6984fbd85f 100644 --- a/tests/data/test399 +++ b/tests/data/test399 @@ -12,7 +12,7 @@ URL http -65536 bytes long hostname in URL +65536-byte-long hostname in URL url = http://%repeat[65536 x a]%/399 diff --git a/tests/data/test741 b/tests/data/test741 index 0c4e0e1a5c..2c118b657d 100644 --- a/tests/data/test741 +++ b/tests/data/test741 @@ -22,7 +22,7 @@ http HOME=%PWD/%LOGDIR -IPFS malformed gw URL from multiline gateway file, first line no url +IPFS malformed gw URL from multiline gateway file, first line no URL ipfs://bafybeidecnvkrygux6uoukouzps5ofkeevoqland7kopseiod6pzqvjg7u diff --git a/tests/data/test743 b/tests/data/test743 index cf6eb8da8d..8627c36c10 100644 --- a/tests/data/test743 +++ b/tests/data/test743 @@ -31,7 +31,7 @@ Funny-head: yesyes http ---config with a 127 byte line +--config with a 127-byte line -A pointless diff --git a/tests/data/test744 b/tests/data/test744 index 7db113b036..06f99e8379 100644 --- a/tests/data/test744 +++ b/tests/data/test744 @@ -45,7 +45,7 @@ http http-proxy ---netrc-file with a 127 byte line +--netrc-file with a 127-byte line machine foo.host login foo password baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar diff --git a/tests/data/test830 b/tests/data/test830 index 755629bc4b..36ab0a31ec 100644 --- a/tests/data/test830 +++ b/tests/data/test830 @@ -44,7 +44,7 @@ IMAP CRAM-MD5 graceful cancellation 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "LOGOUT" +# transfer and such a connection does not get a "LOGOUT" A001 CAPABILITY A002 AUTHENTICATE CRAM-MD5 diff --git a/tests/data/test831 b/tests/data/test831 index be101931d7..436f98fd10 100644 --- a/tests/data/test831 +++ b/tests/data/test831 @@ -45,7 +45,7 @@ IMAP NTLM graceful cancellation 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "LOGOUT" +# transfer and such a connection does not get a "LOGOUT" A001 CAPABILITY A002 AUTHENTICATE NTLM diff --git a/tests/data/test832 b/tests/data/test832 index 2b455901dc..bcc7465724 100644 --- a/tests/data/test832 +++ b/tests/data/test832 @@ -46,7 +46,7 @@ IMAP DIGEST-MD5 graceful cancellation 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "LOGOUT" +# transfer and such a connection does not get a "LOGOUT" A001 CAPABILITY A002 AUTHENTICATE DIGEST-MD5 diff --git a/tests/data/test844 b/tests/data/test844 index 6761a3aa94..7237827d98 100644 --- a/tests/data/test844 +++ b/tests/data/test844 @@ -39,7 +39,7 @@ IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "LOGOUT" +# transfer and such a connection does not get a "LOGOUT" A001 CAPABILITY A002 AUTHENTICATE OAUTHBEARER diff --git a/tests/data/test845 b/tests/data/test845 index 0906806287..97f61b7781 100644 --- a/tests/data/test845 +++ b/tests/data/test845 @@ -41,7 +41,7 @@ IMAP OAuth 2.0 (OAUTHBEARER) failure as continuation with initial response 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "LOGOUT" +# transfer and such a connection does not get a "LOGOUT" A001 CAPABILITY A002 AUTHENTICATE OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%IMAPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64% diff --git a/tests/data/test849 b/tests/data/test849 index c48f4447fa..390c331326 100644 --- a/tests/data/test849 +++ b/tests/data/test849 @@ -38,7 +38,7 @@ IMAP plain auth with alt authorization identity (Not authorized) 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "LOGOUT" +# transfer and such a connection does not get a "LOGOUT" A001 CAPABILITY A002 AUTHENTICATE PLAIN diff --git a/tests/data/test856 b/tests/data/test856 index cf8602b5ae..553907a114 100644 --- a/tests/data/test856 +++ b/tests/data/test856 @@ -34,7 +34,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:wrong 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" CAPA USER user diff --git a/tests/data/test876 b/tests/data/test876 index ffc280281b..3a81468729 100644 --- a/tests/data/test876 +++ b/tests/data/test876 @@ -45,7 +45,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" CAPA AUTH CRAM-MD5 diff --git a/tests/data/test877 b/tests/data/test877 index 8433b8118b..8f359ff8ec 100644 --- a/tests/data/test877 +++ b/tests/data/test877 @@ -46,7 +46,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u testuser:testpass 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" CAPA AUTH NTLM diff --git a/tests/data/test878 b/tests/data/test878 index 23f074d53f..588a22b502 100644 --- a/tests/data/test878 +++ b/tests/data/test878 @@ -47,7 +47,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user:secret 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" CAPA AUTH DIGEST-MD5 diff --git a/tests/data/test889 b/tests/data/test889 index bd5615bd2b..8a808beda5 100644 --- a/tests/data/test889 +++ b/tests/data/test889 @@ -42,7 +42,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" CAPA AUTH OAUTHBEARER diff --git a/tests/data/test890 b/tests/data/test890 index 4aec72a384..0892ba5b47 100644 --- a/tests/data/test890 +++ b/tests/data/test890 @@ -42,7 +42,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u user --oauth2-bearer mF_9.B5f-4.1JqM --s 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" CAPA AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%POP3PORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64% diff --git a/tests/data/test893 b/tests/data/test893 index 1ba48a23a1..2e2ed52152 100644 --- a/tests/data/test893 +++ b/tests/data/test893 @@ -40,7 +40,7 @@ pop3://%HOSTIP:%POP3PORT/%TESTNUMBER -u kurt:xipj3plmq --sasl-authzid ursel 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" CAPA AUTH PLAIN diff --git a/tests/data/test932 b/tests/data/test932 index e039cda637..ec002ae314 100644 --- a/tests/data/test932 +++ b/tests/data/test932 @@ -44,7 +44,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" EHLO %TESTNUMBER AUTH CRAM-MD5 diff --git a/tests/data/test933 b/tests/data/test933 index 7fce345e02..0c4a8c42cd 100644 --- a/tests/data/test933 +++ b/tests/data/test933 @@ -45,7 +45,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" EHLO %TESTNUMBER AUTH NTLM diff --git a/tests/data/test934 b/tests/data/test934 index 3b9ea78090..c440eb4974 100644 --- a/tests/data/test934 +++ b/tests/data/test934 @@ -46,7 +46,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" EHLO %TESTNUMBER AUTH DIGEST-MD5 diff --git a/tests/data/test948 b/tests/data/test948 index 98c86a78c6..6955f993a9 100644 --- a/tests/data/test948 +++ b/tests/data/test948 @@ -45,7 +45,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" EHLO %TESTNUMBER AUTH OAUTHBEARER diff --git a/tests/data/test949 b/tests/data/test949 index 954664ad29..d2407048c5 100644 --- a/tests/data/test949 +++ b/tests/data/test949 @@ -44,7 +44,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" EHLO %TESTNUMBER AUTH OAUTHBEARER %b64[n,a=user,%01host=127.0.0.1%01port=%SMTPPORT%01auth=Bearer mF_9.B5f-4.1JqM%01%01]b64% diff --git a/tests/data/test954 b/tests/data/test954 index 29f85fb105..1d39ff9f10 100644 --- a/tests/data/test954 +++ b/tests/data/test954 @@ -42,7 +42,7 @@ smtp://%HOSTIP:%SMTPPORT/%TESTNUMBER --mail-rcpt recipient@example.com --mail-fr 67 # The multi interface considers a broken "CONNECT" as a prematurely broken -# transfer and such a connection will not get a "QUIT" +# transfer and such a connection does not get a "QUIT" EHLO %TESTNUMBER AUTH PLAIN diff --git a/tests/ech_tests.sh b/tests/ech_tests.sh index e5b413fa82..5b6f60d555 100755 --- a/tests/ech_tests.sh +++ b/tests/ech_tests.sh @@ -223,7 +223,7 @@ echo "-----" > "$logfile" echo "Running $0 at $NOW" >> "$logfile" echo "Running $0 at $NOW" -# check we have the binaries needed and which TLS library we will be using +# check we have the binaries needed and which TLS library we are using if [ -f "$OSSL"/libssl.so ]; then have_ossl="yes" fi @@ -1083,7 +1083,7 @@ else echo "NOT all good, log in $logfile" fi -# send a mail to root (will be forwarded) but only once every 24 hours +# send a mail to root (it is forwarded) but only once every 24 hours # 'cause we only really need "new" news itsnews="yes" age_of_news=0 diff --git a/tests/libtest/cli_hx_download.c b/tests/libtest/cli_hx_download.c index 2dca8f496d..b472ed5691 100644 --- a/tests/libtest/cli_hx_download.c +++ b/tests/libtest/cli_hx_download.c @@ -287,7 +287,7 @@ static void usage_hx_download(const char *msg) " -r :: resolve information\n" " -T number max concurrent connections total\n" " -V http_version (http/1.1, h2, h3) http version to use\n" - " -6 use ipv6 for resolving the FIRST url\n" + " -6 use ipv6 for resolving the FIRST URL\n" ); } diff --git a/tests/libtest/first.h b/tests/libtest/first.h index f4ddb27e14..a84be41669 100644 --- a/tests/libtest/first.h +++ b/tests/libtest/first.h @@ -146,7 +146,7 @@ void ws_close(CURL *curl); /* close the connection */ * should be immediately followed by checking if 'res' variable has been * set. * - * 'res' variable when set will hold a CURLcode, CURLMcode, or any of the + * 'res' variable when set holds a CURLcode, CURLMcode, or any of the * TEST_ERR_* values defined above. It is advisable to return this value * as test result. */ diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c index 67ccce00ee..d125a4975b 100644 --- a/tests/libtest/lib1507.c +++ b/tests/libtest/lib1507.c @@ -105,8 +105,8 @@ static CURLcode test_lib1507(const char *URL) /* In a real-world program you OF COURSE check the return code of the function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in - case of (maxfd == -1), we call select(0, ...), which is basically equal - to sleep. */ + case of (maxfd == -1), we call select(0, ...), which is equal to sleep. + */ rc = select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout); diff --git a/tests/libtest/lib1514.c b/tests/libtest/lib1514.c index 7a7a76fff0..a799e7668d 100644 --- a/tests/libtest/lib1514.c +++ b/tests/libtest/lib1514.c @@ -41,13 +41,13 @@ static size_t t1514_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; if(pooh->sizeleft) { - *ptr = pooh->readptr[0]; /* copy one single byte */ - pooh->readptr++; /* advance pointer */ - pooh->sizeleft--; /* less data left */ - return 1; /* we return 1 byte at a time! */ + *ptr = pooh->readptr[0]; /* copy one single byte */ + pooh->readptr++; /* advance pointer */ + pooh->sizeleft--; /* less data left */ + return 1; /* we return 1 byte at a time! */ } - return 0; /* no more data left to deliver */ + return 0; /* no more data left to deliver */ } static CURLcode test_lib1514(const char *URL) diff --git a/tests/libtest/lib1517.c b/tests/libtest/lib1517.c index 57b0a0d5a5..d77d79b5e8 100644 --- a/tests/libtest/lib1517.c +++ b/tests/libtest/lib1517.c @@ -33,8 +33,8 @@ static size_t t1517_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) struct t1517_WriteThis *pooh = (struct t1517_WriteThis *)userp; size_t tocopy = size * nmemb; - /* Wait one second before return POST data * - * so libcurl will wait before sending request body */ + /* Wait one second before return POST data + so libcurl waits before sending request body */ curlx_wait_ms(1000); if(tocopy < 1 || !pooh->sizeleft) @@ -43,9 +43,9 @@ static size_t t1517_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) if(pooh->sizeleft < tocopy) tocopy = pooh->sizeleft; - memcpy(ptr, pooh->readptr, tocopy);/* copy requested data */ - pooh->readptr += tocopy; /* advance pointer */ - pooh->sizeleft -= tocopy; /* less data left */ + memcpy(ptr, pooh->readptr, tocopy); /* copy requested data */ + pooh->readptr += tocopy; /* advance pointer */ + pooh->sizeleft -= tocopy; /* less data left */ return tocopy; } @@ -100,7 +100,7 @@ static CURLcode test_lib1517(const char *URL) test_setopt(curl, CURLOPT_FAILONERROR, 1L); #endif - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib1518.c b/tests/libtest/lib1518.c index 60be92328b..a047e51bad 100644 --- a/tests/libtest/lib1518.c +++ b/tests/libtest/lib1518.c @@ -58,7 +58,7 @@ static CURLcode test_lib1518(const char *URL) test_setopt(curl, CURLOPT_FOLLOWLOCATION, 0L); } - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); if(result) goto test_cleanup; diff --git a/tests/libtest/lib1525.c b/tests/libtest/lib1525.c index 29ce7a9a0b..0c25f582ca 100644 --- a/tests/libtest/lib1525.c +++ b/tests/libtest/lib1525.c @@ -24,7 +24,7 @@ ***************************************************************************/ /* - * This unit test PUT http data over proxy. Proxy header will be different + * This unit test PUT http data over proxy. Proxy header is different * from server http header */ diff --git a/tests/libtest/lib1526.c b/tests/libtest/lib1526.c index 30c4f55235..380ebc7d02 100644 --- a/tests/libtest/lib1526.c +++ b/tests/libtest/lib1526.c @@ -23,7 +23,7 @@ ***************************************************************************/ /* - * This unit test PUT http data over proxy. Proxy header will be different + * This unit test PUT http data over proxy. Proxy header is different * from server http header */ diff --git a/tests/libtest/lib1527.c b/tests/libtest/lib1527.c index efa39efb73..b3e0dbc911 100644 --- a/tests/libtest/lib1527.c +++ b/tests/libtest/lib1527.c @@ -23,7 +23,7 @@ ***************************************************************************/ /* - * This unit test PUT http data over proxy. Same http header will be generated + * This unit test PUT http data over proxy. Same http header is generated * for server and proxy */ diff --git a/tests/libtest/lib1554.c b/tests/libtest/lib1554.c index 4b4b07cb0c..8b37374c5a 100644 --- a/tests/libtest/lib1554.c +++ b/tests/libtest/lib1554.c @@ -72,8 +72,8 @@ static CURLcode test_lib1554(const char *URL) curl_share_setopt(share, CURLSHOPT_LOCKFUNC, t1554_test_lock); curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, t1554_test_unlock); - /* Loop the transfer and cleanup the handle properly every lap. This will - still reuse connections since the pool is in the shared object! */ + /* Loop the transfer and cleanup the handle properly every lap. This + still reuses connections since the pool is in the shared object! */ for(i = 0; i < 3; i++) { CURL *curl = curl_easy_init(); @@ -83,7 +83,7 @@ static CURLcode test_lib1554(const char *URL) /* use the share object */ curl_easy_setopt(curl, CURLOPT_SHARE, share); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); /* always cleanup */ diff --git a/tests/libtest/lib1557.c b/tests/libtest/lib1557.c index 60662aac80..e94941934a 100644 --- a/tests/libtest/lib1557.c +++ b/tests/libtest/lib1557.c @@ -48,7 +48,7 @@ static CURLcode test_lib1557(const char *URL) multi_remove_handle(multi, curl2); - /* If curl2 is still in the connect-pending list, this will crash */ + /* If curl2 is still in the connect-pending list, this crashes */ multi_remove_handle(multi, curl1); test_cleanup: diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c index 5e15e9c051..d4274bfb3e 100644 --- a/tests/libtest/lib1560.c +++ b/tests/libtest/lib1560.c @@ -27,7 +27,7 @@ * * Since the URL parser by default only accepts schemes that *this instance* * of libcurl supports, make sure that the test1560 file lists all the schemes - * that this test will assume to be present! + * that this test assumes to be present! */ #include "first.h" @@ -201,7 +201,7 @@ static const struct testcase get_parts_list[] = { "", 0, 0, CURLUE_BAD_HOSTNAME }, { /* Host starting with a dash (RFC 1123 technically allows it, but many - parsers don't) */ + parsers do not) */ "http://-atest/", "http | [11] | [12] | [13] | -atest | [15] | / | [16] | [17]", 0, 0, CURLUE_OK }, @@ -825,7 +825,7 @@ static const struct urltestcase get_url_list[] = { {"https://0xff.0xff.0377.255", "https://255.255.255.255/", 0, 0, CURLUE_OK}, {"https://0XFF.0XFF.0377.255", "https://255.255.255.255/", 0, 0, CURLUE_OK}, {"https://1.0xffffff", "https://1.255.255.255/", 0, 0, CURLUE_OK}, - /* IPv4 numerical overflows or syntax errors will not normalize */ + /* IPv4 numerical overflows or syntax errors do not normalize */ {"https://a127.0.0.1", "https://a127.0.0.1/", 0, 0, CURLUE_OK}, {"https://\xff.127.0.0.1", "https://%FF.127.0.0.1/", 0, CURLU_URLENCODE, CURLUE_OK}, @@ -1070,7 +1070,7 @@ static const struct setcase set_parts_list[] = { "https://example.com/one%20/$!$&'()*+;=:@{}[]%25", 0, CURLU_URLENCODE, CURLUE_OK, CURLUE_OK}, {NULL, /* start fresh! */ - "scheme=https,path=/,url=\"\",", /* incomplete url, redirect to "" */ + "scheme=https,path=/,url=\"\",", /* incomplete URL, redirect to "" */ "https://example.com/", 0, 0, CURLUE_OK, CURLUE_MALFORMED_INPUT}, {NULL, /* start fresh! */ diff --git a/tests/libtest/lib1588.c b/tests/libtest/lib1588.c index fd5cd47170..896a08a854 100644 --- a/tests/libtest/lib1588.c +++ b/tests/libtest/lib1588.c @@ -102,7 +102,7 @@ static CURLcode test_lib1588(const char *URL) curl_msnprintf(proxy2_resolve, sizeof(proxy2_resolve), "secondproxy:%s:%s", libtest_arg3, libtest_arg2); - /* we connect to the fake host name but the right port number */ + /* we connect to the fake hostname but the right port number */ curl_msnprintf(proxy1_connect, sizeof(proxy1_connect), "firstproxy:%s", libtest_arg3); curl_msnprintf(proxy2_connect, sizeof(proxy2_connect), diff --git a/tests/libtest/lib1591.c b/tests/libtest/lib1591.c index 5b2b913037..ee32cbea62 100644 --- a/tests/libtest/lib1591.c +++ b/tests/libtest/lib1591.c @@ -23,7 +23,7 @@ ***************************************************************************/ /* - * This unit test PUT http data over proxy. Proxy header will be different + * This unit test PUT http data over proxy. Proxy header is different * from server http header */ diff --git a/tests/libtest/lib1592.c b/tests/libtest/lib1592.c index 46c2610a3d..497659b100 100644 --- a/tests/libtest/lib1592.c +++ b/tests/libtest/lib1592.c @@ -29,12 +29,11 @@ * only tests whichever resolver curl is actually built with. */ -/* We are willing to wait a generous two seconds for the removal. This is - as low as we can go while still easily supporting SIGALRM timing for the - non-threaded blocking resolver. It does not matter that much because when - the test passes, we never wait this long. We set it much higher via - the default TEST_HANG_TIMEOUT to avoid issues when running on overloaded - CI machines. */ +/* We are waiting a generous two seconds for the removal. This is as low as we + can go while still easily supporting SIGALRM timing for the non-threaded + blocking resolver. It does not matter that much because when the test + passes, we never wait this long. We set it much higher via the default + TEST_HANG_TIMEOUT to avoid issues when running on overloaded CI machines. */ #include "first.h" @@ -56,13 +55,13 @@ static CURLcode test_lib1592(const char *URL) easy_setopt(curl, CURLOPT_VERBOSE, 1L); easy_setopt(curl, CURLOPT_URL, URL); - /* Set a DNS server that hopefully will not respond when using c-ares. */ + /* Set a DNS server that hopefully does not respond when using c-ares. */ if(curl_easy_setopt(curl, CURLOPT_DNS_SERVERS, "0.0.0.0") == CURLE_OK) /* Since we could set the DNS server, presume we are working with a resolver that can be cancelled (i.e. c-ares). Thus, curl_multi_remove_handle() should not block even when the resolver request is outstanding. Thus, set a request timeout _longer_ than the - test hang timeout so we will fail if the handle removal call incorrectly + test hang timeout so we fail if the handle removal call incorrectly blocks. */ timeout = TEST_HANG_TIMEOUT * 2; else { @@ -72,18 +71,17 @@ static CURLcode test_lib1592(const char *URL) curl_multi_remove_handle() call does finish well within our test timeout. - But, it is unlikely that the resolver request will take any time at + But, it is unlikely that the resolver request takes any time at all because we have not been able to configure the resolver to use an - non-responsive DNS server. At least we exercise the flow. - */ + non-responsive DNS server. At least we exercise the flow. */ curl_mfprintf(stderr, "CURLOPT_DNS_SERVERS not supported; " - "assuming curl_multi_remove_handle() will block\n"); + "assuming curl_multi_remove_handle() does block\n"); timeout = TEST_HANG_TIMEOUT / 2; } /* Setting a timeout on the request should ensure that even if we have to - wait for the resolver during curl_multi_remove_handle(), it will not take + wait for the resolver during curl_multi_remove_handle(), it does not take longer than this, because the resolver request inherits its timeout from this. */ easy_setopt(curl, CURLOPT_TIMEOUT_MS, timeout); diff --git a/tests/libtest/lib1598.c b/tests/libtest/lib1598.c index 50d715ffe7..7786d6dddd 100644 --- a/tests/libtest/lib1598.c +++ b/tests/libtest/lib1598.c @@ -23,7 +23,7 @@ ***************************************************************************/ /* - * This unit test PUT http data over proxy. Proxy header will be different + * This unit test PUT http data over proxy. Proxy header is different * from server http header */ diff --git a/tests/libtest/lib1648.c b/tests/libtest/lib1648.c index 048068985b..91afbcead4 100644 --- a/tests/libtest/lib1648.c +++ b/tests/libtest/lib1648.c @@ -84,7 +84,7 @@ static CURLcode test_lib1648(const char *hostip) curl_msnprintf(proxy2_resolve, sizeof(proxy2_resolve), "secondproxy:%s:%s", libtest_arg2, hostip); - /* we connect to the fake host name but the right port number */ + /* we connect to the fake hostname but the right port number */ curl_msnprintf(proxy1_connect, sizeof(proxy1_connect), "firstproxy:%s", libtest_arg2); curl_msnprintf(proxy2_connect, sizeof(proxy2_connect), diff --git a/tests/libtest/lib1939.c b/tests/libtest/lib1939.c index be1e303beb..5445251df3 100644 --- a/tests/libtest/lib1939.c +++ b/tests/libtest/lib1939.c @@ -41,7 +41,7 @@ static CURLcode test_lib1939(const char *URL) /* Crash only happens when using HTTPS */ result = curl_easy_setopt(curl, CURLOPT_URL, URL); if(!result) - /* Any old HTTP tunneling proxy will do here */ + /* Any old HTTP tunneling proxy does the job here */ result = curl_easy_setopt(curl, CURLOPT_PROXY, libtest_arg2); if(!result) { diff --git a/tests/libtest/lib2023.c b/tests/libtest/lib2023.c index 5d99860039..3cc1dac1b4 100644 --- a/tests/libtest/lib2023.c +++ b/tests/libtest/lib2023.c @@ -35,7 +35,7 @@ static CURLcode send_request(CURL *curl, const char *url, int seq, size_t len = strlen(url) + 4 + 1; char *full_url = curlx_malloc(len); if(!full_url) { - curl_mfprintf(stderr, "Not enough memory for full url\n"); + curl_mfprintf(stderr, "Not enough memory for full URL\n"); return CURLE_OUT_OF_MEMORY; } diff --git a/tests/libtest/lib2032.c b/tests/libtest/lib2032.c index 6d86187a09..e06a4d704b 100644 --- a/tests/libtest/lib2032.c +++ b/tests/libtest/lib2032.c @@ -95,7 +95,7 @@ static CURLcode test_lib2032(const char *URL) /* libntlmconnect */ start_test_timing(); if(!full_url) { - curl_mfprintf(stderr, "Not enough memory for full url\n"); + curl_mfprintf(stderr, "Not enough memory for full URL\n"); return TEST_ERR_MAJOR_BAD; } diff --git a/tests/libtest/lib2405.c b/tests/libtest/lib2405.c index e1bf8c75b0..412faf45a0 100644 --- a/tests/libtest/lib2405.c +++ b/tests/libtest/lib2405.c @@ -29,8 +29,8 @@ * HTTP1 amd HTTP2 (no multiplexing) two transfers (expected two descriptors), * HTTP2 with multiplexing (expected one descriptors) * Improper inputs to the API result in CURLM_BAD_FUNCTION_ARGUMENT. - * Sending an empty ufds, and size = 0 will return the number of fds needed. - * Sending a non-empty ufds, but smaller than the fds needed will result in a + * Sending an empty ufds, and size = 0 returns the number of fds needed. + * Sending a non-empty ufds, but smaller than the fds needed results in a * CURLM_OUT_OF_MEMORY, and a number of fds that is >= to the number needed. * * It is also expected that all transfers run by multi-handle should complete diff --git a/tests/libtest/lib3034.c b/tests/libtest/lib3034.c index 6a5444085c..3aeca9edbd 100644 --- a/tests/libtest/lib3034.c +++ b/tests/libtest/lib3034.c @@ -42,7 +42,7 @@ static CURLcode test_lib3034(const char *URL) global_init(CURL_GLOBAL_ALL); easy_init(curl); - /* This first request will receive a redirect response; deliberately only + /* This first request receives a redirect response; deliberately only * set the CURLOPT_READFUNCTION but not the CURLOPT_SEEKFUNCTION to force a * rewind failure (CURLE_SEND_FAIL_REWIND). */ diff --git a/tests/libtest/lib3102.c b/tests/libtest/lib3102.c index a7e1cefe7f..7efaf9803a 100644 --- a/tests/libtest/lib3102.c +++ b/tests/libtest/lib3102.c @@ -110,7 +110,7 @@ static CURLcode test_lib3102(const char *URL) test_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); test_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); if(!result || result == CURLE_GOT_NOTHING) { struct curl_certinfo *cert_info = NULL; diff --git a/tests/libtest/lib3207.c b/tests/libtest/lib3207.c index 9ef77edf46..77df591710 100644 --- a/tests/libtest/lib3207.c +++ b/tests/libtest/lib3207.c @@ -73,8 +73,8 @@ static unsigned int test_thread(void *ptr) int i; - /* Loop the transfer and cleanup the handle properly every lap. This will - still reuse SSL session since the pool is in the shared object! */ + /* Loop the transfer and cleanup the handle properly every lap. This + still reuses SSL session since the pool is in the shared object. */ for(i = 0; i < PER_THREAD_SIZE; i++) { CURL *curl = curl_easy_init(); if(curl) { @@ -88,7 +88,7 @@ static unsigned int test_thread(void *ptr) curl_easy_setopt(curl, CURLOPT_WRITEDATA, ptr); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); /* always cleanup */ diff --git a/tests/libtest/lib500.c b/tests/libtest/lib500.c index 6e64704ee0..5797348884 100644 --- a/tests/libtest/lib500.c +++ b/tests/libtest/lib500.c @@ -108,7 +108,7 @@ static CURLcode test_lib500(const char *URL) &time_starttransfer); curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &time_total); - /* since the timing will always vary we only compare relative + /* since the timing always varies we only compare relative differences between these 5 times */ if(time_namelookup > time_connect) { curl_mfprintf(moo, "namelookup vs connect: %" CURL_FORMAT_CURL_OFF_T diff --git a/tests/libtest/lib508.c b/tests/libtest/lib508.c index e5823c510c..b3ce99fb70 100644 --- a/tests/libtest/lib508.c +++ b/tests/libtest/lib508.c @@ -36,13 +36,13 @@ static size_t t508_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; if(pooh->sizeleft) { - *ptr = pooh->readptr[0]; /* copy one single byte */ - pooh->readptr++; /* advance pointer */ - pooh->sizeleft--; /* less data left */ - return 1; /* we return 1 byte at a time! */ + *ptr = pooh->readptr[0]; /* copy one single byte */ + pooh->readptr++; /* advance pointer */ + pooh->sizeleft--; /* less data left */ + return 1; /* we return 1 byte at a time! */ } - return 0; /* no more data left to deliver */ + return 0; /* no more data left to deliver */ } static CURLcode test_lib508(const char *URL) @@ -91,7 +91,7 @@ static CURLcode test_lib508(const char *URL) /* include headers in the output */ test_setopt(curl, CURLOPT_HEADER, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib510.c b/tests/libtest/lib510.c index c325dc0bb7..28fb93d586 100644 --- a/tests/libtest/lib510.c +++ b/tests/libtest/lib510.c @@ -112,7 +112,7 @@ static CURLcode test_lib510(const char *URL) test_setopt(curl, CURLOPT_USERPWD, "foo:bar"); } - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib513.c b/tests/libtest/lib513.c index fb1ead53be..34d505c4e5 100644 --- a/tests/libtest/lib513.c +++ b/tests/libtest/lib513.c @@ -70,7 +70,7 @@ static CURLcode test_lib513(const char *URL) /* include headers in the output */ test_setopt(curl, CURLOPT_HEADER, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib514.c b/tests/libtest/lib514.c index 89db064582..4afd7cc015 100644 --- a/tests/libtest/lib514.c +++ b/tests/libtest/lib514.c @@ -66,7 +66,7 @@ static CURLcode test_lib514(const char *URL) /* Now, we should be making a fine HEAD request */ - /* Perform the request 2, result will get the return code */ + /* Perform the request 2, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c index ef8663c39a..609a44a06b 100644 --- a/tests/libtest/lib517.c +++ b/tests/libtest/lib517.c @@ -73,9 +73,9 @@ static CURLcode test_lib517(const char *URL) { "1-Jan-2003 00:00:00 GMT", 1041379200 }, { "1-Jan-2003 00:00:00 GMT", 1041379200 }, { "Wed,18-Apr-07 22:50:12 GMT", 1176936612 }, - { "WillyWonka , 18-Apr-07 22:50:12 GMT", -1 }, - { "WillyWonka , 18-Apr-07 22:50:12", -1 }, - { "WillyWonka , 18-apr-07 22:50:12", -1 }, + { "BillyWonka , 18-Apr-07 22:50:12 GMT", -1 }, + { "BillyWonka , 18-Apr-07 22:50:12", -1 }, + { "BillyWonka , 18-apr-07 22:50:12", -1 }, { "Mon, 18-Apr-1977 22:50:13 GMT", 230251813 }, { "Mon, 18-Apr-77 22:50:13 GMT", 230251813 }, { "Sat, 15-Apr-17\"21:01:22\"GMT", 1492290082 }, diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c index 30270af13d..25e1b5b75e 100644 --- a/tests/libtest/lib518.c +++ b/tests/libtest/lib518.c @@ -123,7 +123,7 @@ static int t518_test_rlimit(int keep_open) * limit. Due to some other system limit the soft limit * might not be raised up to the hard limit. So from this * point the resulting soft limit is our limit. Trying to - * open more than soft limit file descriptors will fail. + * open more than soft limit file descriptors does fail. */ if(rl.rlim_cur != rl.rlim_max) { @@ -236,7 +236,7 @@ static int t518_test_rlimit(int keep_open) for(i = 0; i < nitems; i++) memchunk[i] = -1; - /* set the number of file descriptors we will try to open */ + /* set the number of file descriptors we try to open */ t518_num_open.rlim_max = NUM_OPEN; @@ -342,7 +342,7 @@ static int t518_test_rlimit(int keep_open) * greater than FD_SETSIZE. In any case, macro VERIFY_SOCK * in lib/select.c enforces this check and protects libcurl * from a possible crash. The effect of this protection - * is that test 518 will always fail, since the actual + * is that test 518 always fails, since the actual * call to select() never takes place. We skip test 518 * with an indication that select limit would be exceeded. */ diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c index 88ea084b9a..caedbde935 100644 --- a/tests/libtest/lib525.c +++ b/tests/libtest/lib525.c @@ -85,7 +85,7 @@ static CURLcode test_lib525(const char *URL) /* NOTE: if you want this code to work on Windows with libcurl as a DLL, you MUST also provide a read callback with CURLOPT_READFUNCTION. Failing to - do so will give you a crash since a DLL may not use the variable's memory + do so gives you a crash since a DLL may not use the variable's memory when passed in to it from an app like this. */ /* Set the size of the file to upload (optional). If you give a *_LARGE diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c index 2a3461a80a..23fbe727c4 100644 --- a/tests/libtest/lib526.c +++ b/tests/libtest/lib526.c @@ -147,7 +147,7 @@ test_cleanup: /* Upon non-failure test flow the easy's have already been cleanup'ed. In case there is a failure we arrive here with easy's that have not been cleanup'ed yet, in this case we have to cleanup them or otherwise these - will be leaked, let's use undocumented cleanup sequence - type UB */ + leak, let's use undocumented cleanup sequence - type UB */ if(result != CURLE_OK) for(i = 0; i < CURL_ARRAYSIZE(curl); i++) diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c index a3796b34d0..84b053e7f8 100644 --- a/tests/libtest/lib537.c +++ b/tests/libtest/lib537.c @@ -124,7 +124,7 @@ static int t537_test_rlimit(int keep_open) * limit. Due to some other system limit the soft limit * might not be raised up to the hard limit. So from this * point the resulting soft limit is our limit. Trying to - * open more than soft limit file descriptors will fail. + * open more than soft limit file descriptors does fail. */ if(rl.rlim_cur != rl.rlim_max) { @@ -173,10 +173,10 @@ static int t537_test_rlimit(int keep_open) /* * test 537 is all about testing libcurl functionality * when the system has nearly exhausted the number of - * available file descriptors. Test 537 will try to run + * available file descriptors. Test 537 tries to run * with a small number of file descriptors available. * This implies that any file descriptor which is open - * when the test runs will have a number in the high range + * when the test runs does have a number in the high range * of whatever the system supports. */ @@ -216,7 +216,7 @@ static int t537_test_rlimit(int keep_open) for(i = 0; i < nitems; i++) memchunk[i] = -1; - /* set the number of file descriptors we will try to open */ + /* set the number of file descriptors we try to open */ #ifdef RLIM_INFINITY if((rl.rlim_cur > 0) && (rl.rlim_cur != RLIM_INFINITY)) { @@ -358,7 +358,7 @@ static int t537_test_rlimit(int keep_open) * greater than FD_SETSIZE. In any case, macro VERIFY_SOCK * in lib/select.c enforces this check and protects libcurl * from a possible crash. The effect of this protection - * is that test 537 will always fail, since the actual + * is that test 537 always fails, since the actual * call to select() never takes place. We skip test 537 * with an indication that select limit would be exceeded. */ diff --git a/tests/libtest/lib539.c b/tests/libtest/lib539.c index 631718be05..b1d453af44 100644 --- a/tests/libtest/lib539.c +++ b/tests/libtest/lib539.c @@ -53,7 +53,7 @@ static CURLcode test_lib539(const char *URL) if(result == CURLE_OK) { /* * Change the FTP_FILEMETHOD option to use full paths rather than a CWD - * command. Use an innocuous QUOTE command, after which curl will CWD to + * command. Use an innocuous QUOTE command, after which curl does CWD to * ftp_conn->entrypath and then (on the next call to ftp_statemach_act) * find a non-zero ftpconn->dirdepth even though no directories are stored * in the ftpconn->dirs array (after a call to freedirs). diff --git a/tests/libtest/lib554.c b/tests/libtest/lib554.c index 458d9bcb6d..693b9601cd 100644 --- a/tests/libtest/lib554.c +++ b/tests/libtest/lib554.c @@ -176,7 +176,7 @@ static CURLcode t554_test_once(const char *URL, bool oldstyle) /* include headers in the output */ test_setopt(curl, CURLOPT_HEADER, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c index 0c71255478..739a90cf6d 100644 --- a/tests/libtest/lib571.c +++ b/tests/libtest/lib571.c @@ -153,7 +153,7 @@ static CURLcode test_lib571(const char *URL) if(result) goto test_cleanup; - /* The DESCRIBE request will try to consume data after the Content */ + /* The DESCRIBE request tries to consume data after the Content */ stream_uri = tutil_suburl(URL, request++); if(!stream_uri) { result = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib578.c b/tests/libtest/lib578.c index 75b3e8af36..62ccdfedd4 100644 --- a/tests/libtest/lib578.c +++ b/tests/libtest/lib578.c @@ -85,7 +85,7 @@ static CURLcode test_lib578(const char *URL) /* include headers in the output */ test_setopt(curl, CURLOPT_HEADER, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib579.c b/tests/libtest/lib579.c index 35ccd84855..856688853e 100644 --- a/tests/libtest/lib579.c +++ b/tests/libtest/lib579.c @@ -154,7 +154,7 @@ static CURLcode test_lib579(const char *URL) test_setopt(curl, CURLOPT_NOPROGRESS, 0L); test_setopt(curl, CURLOPT_PROGRESSFUNCTION, t579_progress_callback); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); progress_final_report(); diff --git a/tests/libtest/lib599.c b/tests/libtest/lib599.c index 4b26c46737..1d335d4017 100644 --- a/tests/libtest/lib599.c +++ b/tests/libtest/lib599.c @@ -73,7 +73,7 @@ static CURLcode test_lib599(const char *URL) /* include headers in the output */ test_setopt(curl, CURLOPT_HEADER, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); if(!result) { diff --git a/tests/libtest/lib643.c b/tests/libtest/lib643.c index 63df7e0dc7..9367194bb5 100644 --- a/tests/libtest/lib643.c +++ b/tests/libtest/lib643.c @@ -46,12 +46,12 @@ static size_t t643_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) } if(!eof) { - *ptr = *pooh->readptr; /* copy one single byte */ - pooh->readptr++; /* advance pointer */ - return 1; /* we return 1 byte at a time! */ + *ptr = *pooh->readptr; /* copy one single byte */ + pooh->readptr++; /* advance pointer */ + return 1; /* we return 1 byte at a time! */ } - return 0; /* no more data left to deliver */ + return 0; /* no more data left to deliver */ } static CURLcode t643_test_once(const char *URL, bool oldstyle) @@ -205,7 +205,7 @@ static CURLcode t643_test_once(const char *URL, bool oldstyle) /* include headers in the output */ test_setopt(curl, CURLOPT_HEADER, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib650.c b/tests/libtest/lib650.c index 8909a7baf4..a2e74b3a84 100644 --- a/tests/libtest/lib650.c +++ b/tests/libtest/lib650.c @@ -189,7 +189,7 @@ static CURLcode test_lib650(const char *URL) /* include headers in the output */ test_setopt(curl, CURLOPT_HEADER, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib651.c b/tests/libtest/lib651.c index a905a22d2b..a5aa2d3227 100644 --- a/tests/libtest/lib651.c +++ b/tests/libtest/lib651.c @@ -75,7 +75,7 @@ static CURLcode test_lib651(const char *URL) /* include headers in the output */ test_setopt(curl, CURLOPT_HEADER, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib652.c b/tests/libtest/lib652.c index d606fa0694..ad29c5d3e3 100644 --- a/tests/libtest/lib652.c +++ b/tests/libtest/lib652.c @@ -111,7 +111,7 @@ static CURLcode test_lib652(const char *URL) /* get verbose debug output please */ test_setopt(curl, CURLOPT_VERBOSE, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib654.c b/tests/libtest/lib654.c index 4729835599..13918b682c 100644 --- a/tests/libtest/lib654.c +++ b/tests/libtest/lib654.c @@ -49,12 +49,12 @@ static size_t t654_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) pooh->sizeleft--; if(!eof) { - *ptr = *pooh->readptr; /* copy one single byte */ - pooh->readptr++; /* advance pointer */ - return 1; /* we return 1 byte at a time! */ + *ptr = *pooh->readptr; /* copy one single byte */ + pooh->readptr++; /* advance pointer */ + return 1; /* we return 1 byte at a time! */ } - return 0; /* no more data left to deliver */ + return 0; /* no more data left to deliver */ } static CURLcode test_lib654(const char *URL) @@ -143,7 +143,7 @@ static CURLcode test_lib654(const char *URL) /* Free the duplicated handle: it should call free_callback again. If the mime copy was bad or not automatically released, valgrind - will signal it. */ + signals it. */ curl_easy_cleanup(curl2); curl2 = NULL; /* Already cleaned up. */ diff --git a/tests/libtest/lib666.c b/tests/libtest/lib666.c index 55dd33ab35..99a94c1dd7 100644 --- a/tests/libtest/lib666.c +++ b/tests/libtest/lib666.c @@ -103,7 +103,7 @@ static CURLcode test_lib666(const char *URL) /* include headers in the output */ test_setopt(curl, CURLOPT_HEADER, 1L); - /* Perform the request, result will get the return code */ + /* Perform the request, result gets the return code */ result = curl_easy_perform(curl); test_cleanup: diff --git a/tests/libtest/lib667.c b/tests/libtest/lib667.c index c0b383d0ac..9077eb8e95 100644 --- a/tests/libtest/lib667.c +++ b/tests/libtest/lib667.c @@ -41,12 +41,12 @@ static size_t t667_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) pooh->sizeleft--; if(!eof) { - *ptr = *pooh->readptr; /* copy one single byte */ - pooh->readptr++; /* advance pointer */ - return 1; /* we return 1 byte at a time! */ + *ptr = *pooh->readptr; /* copy one single byte */ + pooh->readptr++; /* advance pointer */ + return 1; /* we return 1 byte at a time! */ } - return 0; /* no more data left to deliver */ + return 0; /* no more data left to deliver */ } static CURLcode test_lib667(const char *URL) diff --git a/tests/libtest/lib668.c b/tests/libtest/lib668.c index ae0f524e47..3eaa796413 100644 --- a/tests/libtest/lib668.c +++ b/tests/libtest/lib668.c @@ -90,8 +90,7 @@ static CURLcode test_lib668(const char *URL) curl_mime_name(part, "field2"); /* Using an undefined length forces chunked transfer and disables early end of data detection for this part. */ - curl_mime_data_cb(part, (curl_off_t)-1, - t668_read_cb, NULL, NULL, &pooh2); + curl_mime_data_cb(part, (curl_off_t)-1, t668_read_cb, NULL, NULL, &pooh2); part = curl_mime_addpart(mime); curl_mime_name(part, "field3"); /* Regular file part sources early end of data can be detected because diff --git a/tests/libtest/lib753.c b/tests/libtest/lib753.c index a83f4c6b40..6260afb6bc 100644 --- a/tests/libtest/lib753.c +++ b/tests/libtest/lib753.c @@ -134,8 +134,8 @@ static CURLcode test_lib753(const char *URL) * 1. Violently cleanup EASY1 *without* removing it from the multi * handle first. This MUST discard the connection that EASY1 holds, * as EASY1 is not DONE at this point. - * With the env var CURL_FTP_PWD_STOP set, the connection will - * have no outstanding data at this point. This would allow + * With the env var CURL_FTP_PWD_STOP set, the connection has + * no outstanding data at this point. This would allow * reuse if the connection is not terminated by the cleanup. * 2. Add EASY2 for the same URL and observe in the expected result * that the connection is NOT reused, e.g. all FTP commands diff --git a/tests/libtest/lib758.c b/tests/libtest/lib758.c index 174495a52d..c6cd49d853 100644 --- a/tests/libtest/lib758.c +++ b/tests/libtest/lib758.c @@ -386,7 +386,7 @@ static CURLcode t758_one(const char *URL, int timer_fail_at, if(t758_ctx.fake_async_cert_verification_pending && !t758_ctx.fake_async_cert_verification_finished) { - /* the wakeup socket will be monitored */ + /* the wakeup socket is monitored */ if((sockets.read.count > 1) || sockets.write.count) { t758_msg("during verification there should be no sockets scheduled"); result = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/testutil.c b/tests/libtest/testutil.c index b78e1a593d..7336a736f6 100644 --- a/tests/libtest/testutil.c +++ b/tests/libtest/testutil.c @@ -46,7 +46,7 @@ void tutil_rlim2str(char *buf, size_t len, rlim_t val) #endif /* - * Handy CURLOPT_WRITEFUNCTION for tests that don't need to keep received + * Handy CURLOPT_WRITEFUNCTION for tests that do not need to keep received * data. */ size_t tutil_throwaway_cb(char *data, size_t n, size_t l, void *userp) diff --git a/tests/libtest/testutil.h b/tests/libtest/testutil.h index 1667b484cc..9799752cd5 100644 --- a/tests/libtest/testutil.h +++ b/tests/libtest/testutil.h @@ -36,7 +36,7 @@ void tutil_rlim2str(char *buf, size_t len, rlim_t val); #endif /* - * Handy CURLOPT_WRITEFUNCTION for tests that don't need to keep received + * Handy CURLOPT_WRITEFUNCTION for tests that do not need to keep received * data. */ size_t tutil_throwaway_cb(char *data, size_t n, size_t l, void *userp); diff --git a/tests/processhelp.pm b/tests/processhelp.pm index 37648bfc85..434a14f7cf 100644 --- a/tests/processhelp.pm +++ b/tests/processhelp.pm @@ -75,9 +75,8 @@ use globalconfig qw( ####################################################################### # pidfromfile returns the pid stored in the given pidfile. The value -# of the returned pid will never be a negative value. It will be zero -# on any file related error or if a pid can not be extracted from the -# given file. +# of the returned pid is never a negative value. It is zero on any file +# related error or if a pid can not be extracted from the given file. # sub pidfromfile { my $pidfile = $_[0]; @@ -115,9 +114,9 @@ sub winpid_to_pid { ####################################################################### # pidexists checks if a process with a given pid exists and is alive. -# This will return the positive pid if the process exists and is alive. -# This will return the negative pid if the process exists differently. -# This will return 0 if the process could not be found. +# This returns the positive pid if the process exists and is alive. +# This returns the negative pid if the process exists differently. +# This returns 0 if the process could not be found. # sub pidexists { my $pid = $_[0]; @@ -291,11 +290,11 @@ sub pidwait { ####################################################################### # processexists checks if a process with the pid stored in the given -# pidfile exists and is alive. This will return 0 on any file related +# pidfile exists and is alive. This returns 0 on any file related # error or if a pid can not be extracted from the given file. When a # process with the same pid as the one extracted from the given file # is currently alive this returns that positive pid. Otherwise, when -# the process is not alive, will return the negative value of the pid. +# the process is not alive, it returns the negative value of the pid. # sub processexists { use POSIX ":sys_wait_h"; diff --git a/tests/runner.pm b/tests/runner.pm index 7dfbb8478d..6fa68670e9 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -23,8 +23,8 @@ ########################################################################### # This module contains entry points to run a single test. runner_init -# determines whether they will run in a separate process or in the process of -# the caller. The relevant interface is asynchronous so it will work in either +# determines whether they run in a separate process or in the process of +# the caller. The relevant interface is asynchronous so it works in either # case. Program arguments are marshalled and then written to the end of a pipe # (in controlleripccall) which is later read from and the arguments # unmarshalled (in ipcrecv) before the desired function is called normally. @@ -700,9 +700,9 @@ sub singletest_precheck { if($cmd) { my @p = split(/ /, $cmd); if($p[0] !~ /\//) { - # the first word, the command, does not contain a slash so - # we will scan the "improved" PATH to find the command to - # be able to run it + # the first word, the command, does not contain a slash so we + # scan the "improved" PATH to find the command to be able + # to run it my $fullp = checktestcmd($p[0]); if($fullp) { @@ -1411,7 +1411,7 @@ sub runnerar_ready { # Wait for any pipe from any runner to be ready # This may be interrupted and return EINTR, but this is ignored and the - # caller will need to later call this function again. + # caller needs to later call this function again. # TODO: this is relatively slow with hundreds of fds my $e_in = $r_in; if(select(my $r_out = $r_in, undef, my $e_out = $e_in, $blocking) >= 1) { @@ -1452,7 +1452,7 @@ sub ipcrecv { if((!defined $err && ! $!{EINTR}) || (defined $err && $err == 0)) { # pipe has closed; controller is gone and we must exit runnerabort(); - # Special case: no response will be forthcoming + # Special case: no response is forthcoming return 1; } # system call was interrupted, probably by ^C; restart it so we stay in sync @@ -1463,7 +1463,7 @@ sub ipcrecv { if((!defined $err && ! $!{EINTR}) || (defined $err && $err == 0)) { # pipe has closed; controller is gone and we must exit runnerabort(); - # Special case: no response will be forthcoming + # Special case: no response is forthcoming return 1; } # system call was interrupted, probably by ^C; restart it so we stay in sync @@ -1480,7 +1480,7 @@ sub ipcrecv { my @res; if($funcname eq "runner_shutdown") { runner_shutdown(@$argsarrayref); - # Special case: no response will be forthcoming + # Special case: no response is forthcoming return 1; } elsif($funcname eq "runner_stopservers") { @@ -1503,7 +1503,7 @@ sub ipcrecv { if((!defined $err && ! $!{EINTR}) || (defined $err && $err == 0)) { # pipe has closed; controller is gone and we must exit runnerabort(); - # Special case: no response will be forthcoming + # Special case: no response is forthcoming return 1; } # system call was interrupted, probably by ^C; restart it so we stay in sync diff --git a/tests/runtests.pl b/tests/runtests.pl index 6ad802f950..32695e2a52 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -44,7 +44,7 @@ # the contents of the tests/server/ directory must be from the host # running the test suite, while the rest must be from the host running curl. # -# Note that even with these changes a number of tests will still fail (mainly +# Note that even with these changes a number of tests still fail (mainly # to do with cookies, those that set environment variables, or those that # do more than touch the file system in a or # section). These can be added to the $TESTCASES line below, @@ -54,7 +54,7 @@ # to check the remote system's PATH, and the places in the code where # the curl binary is read directly to determine its type also need to be # fixed. As long as the -g option is never given, and the -n is always -# given, this will not be a problem. +# given, this is not a problem. use strict; use warnings; @@ -384,7 +384,7 @@ sub cleardir { } ####################################################################### -# Given two array references, this function will store them in two temporary +# Given two array references, this function stores them in two temporary # files, run 'diff' on them, store the result and return the diff output! sub showdiff { my ($logdir, $firstref, $secondref) = @_; @@ -471,7 +471,7 @@ sub parseprotocols { # Generate a "proto-ipv6" version of each protocol to match the # IPv6 name and a "proto-unix" to match the variant which # uses Unix domain sockets. This works even if support is not - # compiled in because the test will fail. + # compiled in because the test fails. push @protocols, map(("$_-ipv6", "$_-unix"), @protocols); # 'http-proxy' is used in test cases to do CONNECT through @@ -1069,7 +1069,7 @@ sub getrunnerlogdir { # Verify that this test case should be run sub singletest_shouldrun { my $testnum = $_[0]; - my $why; # why the test will not be run + my $why; # why the test is not run my $errorreturncode = 1; # 1 means normal error, 2 means ignored error my @what; # what features are needed @@ -1664,7 +1664,7 @@ sub singletest_check { logmsg "ERROR: runner $runnerid seems to have died\n"; } else { - # TODO: this is a blocking call that will stall the controller, + # TODO: this is a blocking call that stalls the controller, if($verbose) { logmsg "WARNING: blocking call in async function\n"; } @@ -2092,7 +2092,7 @@ sub singletest { logmsg $logs; updatetesttimings($testnum, %$testtimings); if($error == -1) { - # no further verification will occur + # no further verification occurs $timevrfyend{$testnum} = Time::HiRes::time(); my $err = ignoreresultcode($testnum); # Submit the test case result with the CI environment @@ -2112,7 +2112,7 @@ sub singletest { return ($error, 0); } elsif($error > 0) { - # no further verification will occur + # no further verification occurs $timevrfyend{$testnum} = Time::HiRes::time(); # Submit the test case result with the CI environment citest_finishtest($testnum, $error); @@ -2383,7 +2383,7 @@ while(@ARGV) { # use this path to a curl used to verify servers # Particularly useful when you introduce a crashing bug somewhere in - # the development version as then it will not be able to run any tests + # the development version as then it is not able to run any tests # since it cannot verify the servers! $VCURL = shell_quote($ARGV[1]); @@ -3038,7 +3038,7 @@ foreach my $testnum (@at) { $lasttest = $testnum if($testnum > $lasttest); my ($why, $errorreturncode) = singletest_shouldrun($testnum); if($why || $listonly) { - # Display test name now--test will be completely skipped later + # Display test name now--test is completely skipped later my $error = singletest_count($testnum, $why); next; } @@ -3242,9 +3242,9 @@ while(1) { # Once all tests have been scheduled on a runner at the end of a test # run, we wait for their results to come in. If we are still # waiting after a couple of minutes ($endwaitcnt multiplied by - # $runnerwait, plus $jobs because that number will not time out), display - # the same test runner status as we give with a SIGUSR1. This will - # likely point to a single test that has hung. + # $runnerwait, plus $jobs because that number does not time out), display + # the same test runner status as we give with a SIGUSR1. This likely + # points to a single test that has hung. logmsg "Hmmm, the tests are taking a while to finish. Here is the status:\n"; catch_usr1(); $endwaitcnt = 0; diff --git a/tests/server/getpart.c b/tests/server/getpart.c index 226bbc4412..0cc95f6333 100644 --- a/tests/server/getpart.c +++ b/tests/server/getpart.c @@ -67,7 +67,7 @@ static size_t line_length(const char *buffer, int bytestocheck) * * Calling function may call this multiple times with same 'buffer' * and 'bufsize' pointers to avoid multiple buffer allocations. Buffer - * will be reallocated and 'bufsize' increased until whole line fits in + * is reallocated and 'bufsize' increased until whole line fits in * buffer before returning it. * * Calling function is responsible to free allocated buffer. @@ -132,7 +132,7 @@ static int readline(char **buffer, size_t *bufsize, size_t *length, * decoded data, binary or whatever, to the destination. The source buffer * may not hold binary data, only a null-terminated string is valid content. * - * Destination buffer will be enlarged and relocated as needed. + * Destination buffer is enlarged and relocated as needed. * * Calling function is responsible to provide preallocated destination * buffer and also to deallocate it when no longer needed. @@ -230,8 +230,8 @@ static int decodedata(char **buf, /* dest buffer */ * Data is returned in a dynamically allocated buffer, a pointer to this data * and the size of the data is stored at the addresses that caller specifies. * - * If the returned data is a string the returned size will be the length of - * the string excluding null-termination. Otherwise it will be the size + * If the returned data is a string the returned size is the length of + * the string excluding null-termination. Otherwise it is the size * of the returned binary data. * * Calling function is responsible to free returned buffer. diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c index 574d89651e..d6d32ddac2 100644 --- a/tests/server/rtspd.c +++ b/tests/server/rtspd.c @@ -96,7 +96,7 @@ struct rtspd_httprequest { #define CMD_AUTH_REQUIRED "auth_required" -/* 'idle' means that it will accept the request fine but never respond +/* 'idle' means that it accepts the request fine but never responds any data. Keep the connection alive. */ #define CMD_IDLE "idle" @@ -372,7 +372,7 @@ static int rtspd_ProcessRequest(struct rtspd_httprequest *req) req->testno = DOCNUMBER_BADCONNECT; else if(!strncmp(doc, "test", 4)) { /* if the hostname starts with test, the port number used in the - CONNECT line will be used as test number! */ + CONNECT line is used as test number! */ const char *portp = strchr(doc, ':'); if(portp && (*(portp + 1) != '\0') && ISDIGIT(*(portp + 1))) { pval = portp + 1; @@ -424,7 +424,7 @@ static int rtspd_ProcessRequest(struct rtspd_httprequest *req) if((req->cl == 0) && !CURL_STRNICMP("Content-Length:", line, 15)) { /* If we do not ignore content-length, we read it and we read the whole request including the body before we return. If we have been told to - ignore the content-length, we will return as soon as all headers + ignore the content-length, we return as soon as all headers have been received */ curl_off_t clen; const char *p = line + strlen("Content-Length:"); @@ -438,7 +438,7 @@ static int rtspd_ProcessRequest(struct rtspd_httprequest *req) logmsg("Found Content-Length: %zu in the request", (size_t)clen); if(req->skip) - logmsg("... but will abort after %zu bytes", req->cl); + logmsg("... but going to abort after %zu bytes", req->cl); break; } else if(!CURL_STRNICMP("Transfer-Encoding: chunked", line, @@ -860,7 +860,7 @@ static int rtspd_send_doc(curl_socket_t sock, struct rtspd_httprequest *req) } /* If the word 'swsclose' is present anywhere in the reply chunk, the - connection will be closed after the data has been sent to the requesting + connection is closed after the data has been sent to the requesting client... */ if(strstr(buffer, "swsclose") || !count) { persistent = FALSE; @@ -888,7 +888,7 @@ static int rtspd_send_doc(curl_socket_t sock, struct rtspd_httprequest *req) responsesize = count; do { /* Ok, we send no more than 200 bytes at a time, to make sure that - larger chunks are split up so that the client will need to do multiple + larger chunks are split up so that the client needs to do multiple recv() calls to get it and thus we exercise that code better */ size_t num = count; if(num > 200) @@ -1204,8 +1204,8 @@ static int test_rtspd(int argc, const char *argv[]) } /* - * As soon as this server writes its pid file the test harness will - * attempt to connect to this server and initiate its verification. + * As soon as this server writes its pid file the test harness attempts + * to connect to this server and initiate its verification. */ wrotepidfile = write_pidfile(pidname); diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index f5c47baab2..d25195af2d 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -57,14 +57,14 @@ * * This program is intended to be highly portable and as such it must be kept * as simple as possible, due to this the only signal handling mechanisms used - * will be those of ANSI C, and used only in the most basic form which is good + * are those of ANSI C, and used only in the most basic form which is good * enough for the purpose of this program. * * For the above reason and the specific needs of this program signals SIGHUP, - * SIGPIPE and SIGALRM will be ignored on systems where this can be - * done. If possible, signals SIGINT and SIGTERM will be handled by this + * SIGPIPE and SIGALRM are ignored on systems where this can be + * done. If possible, signals SIGINT and SIGTERM are handled by this * program as an indication to cleanup and finish execution as soon as - * possible. This will be achieved with a single signal handler + * possible. This is achieved with a single signal handler * 'exit_signal_handler' for both signals. * * The 'exit_signal_handler' upon the first SIGINT or SIGTERM received signal @@ -175,7 +175,7 @@ static ssize_t write_wincon(int fd, const void *buf, size_t count) #define CURL_WIN32_EPIPE 109 /* - * fullread is a wrapper around the read() function. This will repeat the call + * fullread is a wrapper around the read() function. This repeats the call * to read() until it actually has read the complete number of bytes indicated * in nbytes or it fails with a condition that cannot be handled with a simple * retry of the read call. @@ -228,7 +228,7 @@ static ssize_t fullread(int filedes, void *buffer, size_t nbytes) } /* - * fullwrite is a wrapper around the write() function. This will repeat the + * fullwrite is a wrapper around the write() function. This repeats the * call to write() until it actually has written the complete number of bytes * indicated in nbytes or it fails with a condition that cannot be handled * with a simple retry of the write call. @@ -277,7 +277,7 @@ static ssize_t fullwrite(int filedes, const void *buffer, size_t nbytes) /* * read_stdin tries to read from stdin nbytes into the given buffer. This is a - * blocking function that will only return TRUE when nbytes have actually been + * blocking function that only returns TRUE when nbytes have actually been * read or FALSE when an unrecoverable error has been detected. Failure of this * function is an indication that the sockfilt process should terminate. */ @@ -293,7 +293,7 @@ static bool read_stdin(void *buffer, size_t nbytes) /* * write_stdout tries to write to stdio nbytes from the given buffer. This is a - * blocking function that will only return TRUE when nbytes have actually been + * blocking function that only returns TRUE when nbytes have actually been * written or FALSE when an unrecoverable error has been detected. Failure of * this function is an indication that the sockfilt process should terminate. */ @@ -431,7 +431,7 @@ static DWORD WINAPI select_ws_wait_thread(void *lpParameter) switch(type) { case FILE_TYPE_DISK: /* The handle represents a file on disk, this means: - * - WaitForMultipleObjectsEx will always be signalled for it. + * - WaitForMultipleObjectsEx is always signalled for it. * - comparison of current position in file and total size of * the file can be used to check if we reached the end yet. * @@ -468,7 +468,7 @@ static DWORD WINAPI select_ws_wait_thread(void *lpParameter) case FILE_TYPE_CHAR: /* The handle represents a character input, this means: - * - WaitForMultipleObjectsEx will be signalled on any kind of input, + * - WaitForMultipleObjectsEx is signalled on any kind of input, * including mouse and window size events we do not care about. * * Approach: Loop till either the internal event is signalled @@ -497,7 +497,7 @@ static DWORD WINAPI select_ws_wait_thread(void *lpParameter) case FILE_TYPE_PIPE: /* The handle represents an anonymous or named pipe, this means: - * - WaitForMultipleObjectsEx will always be signalled for it. + * - WaitForMultipleObjectsEx is always signalled for it. * - peek into the pipe and retrieve the amount of data available. * * Approach: Loop till either the internal event is signalled diff --git a/tests/server/sws.c b/tests/server/sws.c index 4e1b3af2b3..dc376a70f5 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -112,14 +112,14 @@ static const char *cmdfile = "log/server.cmd"; #define CMD_AUTH_REQUIRED "auth_required" -/* 'idle' means that it will accept the request fine but never respond +/* 'idle' means that it accepts the request fine but never responds any data. Keep the connection alive. */ #define CMD_IDLE "idle" /* 'stream' means to send a never-ending stream of data */ #define CMD_STREAM "stream" -/* 'connection-monitor' will output when a server/proxy connection gets +/* 'connection-monitor' outputs when a server/proxy connection gets disconnected as for some cases it is important that it gets done at the proper point - like with NTLM */ #define CMD_CONNECTIONMONITOR "connection-monitor" @@ -585,7 +585,7 @@ static int sws_ProcessRequest(struct sws_httprequest *req) if((req->cl == 0) && !CURL_STRNICMP("Content-Length:", line, 15)) { /* If we do not ignore content-length, we read it and we read the whole request including the body before we return. If we have been told to - ignore the content-length, we will return as soon as all headers + ignore the content-length, we return as soon as all headers have been received */ curl_off_t clen; const char *p = line + strlen("Content-Length:"); @@ -602,7 +602,7 @@ static int sws_ProcessRequest(struct sws_httprequest *req) logmsg("Found Content-Length: %zu in the request", (size_t)clen); if(req->skip) - logmsg("... but will abort after %zu bytes", req->cl); + logmsg("... but going to abort after %zu bytes", req->cl); } else if(!CURL_STRNICMP("Transfer-Encoding: chunked", line, strlen("Transfer-Encoding: chunked"))) { @@ -937,7 +937,7 @@ static int sws_send_doc(curl_socket_t sock, struct sws_httprequest *req) } /* If the word 'swsclose' is present anywhere in the reply chunk, the - connection will be closed after the data has been sent to the requesting + connection is closed after the data has been sent to the requesting client... */ if(strstr(buffer, "swsclose") || !count || req->close) { persistent = FALSE; @@ -964,7 +964,7 @@ static int sws_send_doc(curl_socket_t sock, struct sws_httprequest *req) responsesize = count; do { /* Ok, we send no more than N bytes at a time, to make sure that - larger chunks are split up so that the client will need to do multiple + larger chunks are split up so that the client needs to do multiple recv() calls to get it and thus we exercise that code better */ size_t num = count; if(num > 20) @@ -1387,7 +1387,7 @@ success: * either end. * * When doing FTP through a CONNECT proxy, we expect that the data connection - * will be setup while the first connect is still being kept up. Therefore we + * is setup while the first connect is still being kept up. Therefore we * must accept a new connection and deal with it appropriately. */ @@ -2097,7 +2097,7 @@ static int test_sws(int argc, const char *argv[]) } } else if(!strcmp("--connect", argv[arg])) { - /* The connect host IP number that the proxy will connect to no matter + /* The connect host IP number that the proxy connects to no matter what the client asks for, but also use this as a hint that we run as a proxy and do a few different internal choices */ arg++; @@ -2269,8 +2269,8 @@ static int test_sws(int argc, const char *argv[]) #endif /* - * As soon as this server writes its pid file the test harness will - * attempt to connect to this server and initiate its verification. + * As soon as this server writes its pid file the test harness attempts + * to connect to this server and initiate its verification. */ wrotepidfile = write_pidfile(pidname); @@ -2410,12 +2410,12 @@ static int test_sws(int argc, const char *argv[]) * 2) the socket is still open, and * 3) (stale) data is still available (or about to be available) * on that socket - * In that case, this loop will run once more and treat that stale + * In that case, this loop runs once more and treat that stale * data (in service_connection()) as the first data received on * this new HTTP request and report "** Unusual request" (skipall * would have otherwise caused that data to be ignored). Normally, - * that socket will be closed by the client and there will not be - * any stale data to cause this, but stranger things have happened + * that socket is closed by the client and there is no stale data + * to cause this, but stranger things have happened * (see issue #11678). */ init_httprequest(req); diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 65e8eb0bfa..f730506649 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -488,7 +488,7 @@ static int writeit(struct testcase *test, struct tftphdr * volatile *dpp, * synch. Ie: that what I think is the other side's response to packet N is * really their response to packet N-1. * - * So, to try to prevent that, we flush all the input queued up for us on the + * To try to prevent that, we flush all the input queued up for us on the * network connection on our host. * * We return the number of packets we flushed (mostly for reporting when trace diff --git a/tests/server/util.c b/tests/server/util.c index 16575ef388..000a806820 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -66,7 +66,7 @@ void logmsg(const char *msg, ...) static int known_offset; if(!serverlogfile) { - fprintf(stderr, "Serverlogfile not set error\n"); + fprintf(stderr, "Error: Server log file not set\n"); return; } @@ -139,7 +139,7 @@ int win32_init(void) if(err) { curlx_strerror(SOCKERRNO, buffer, sizeof(buffer)); fprintf(stderr, "Winsock init failed: %s\n", buffer); - logmsg("Error initialising Winsock -- aborting"); + logmsg("Error initializing Winsock -- aborting"); return 1; } @@ -309,10 +309,10 @@ static HANDLE thread_main_window = NULL; static HWND hidden_main_window = NULL; #endif -/* signal handler that will be triggered to indicate that the program +/* signal handler that is triggered to indicate that the program * should finish its execution in a controlled manner as soon as possible. - * The first time this is called it will set got_exit_signal to one and - * store in exit_signal the signal that triggered its execution. + * The first time this is called it sets got_exit_signal to 1 and + * stores in exit_signal the signal that triggered its execution. */ /* * Only call signal-safe functions from the signal handler, as required by diff --git a/tests/test1222.pl b/tests/test1222.pl index df7bfa1c0f..d34fb7bca4 100755 --- a/tests/test1222.pl +++ b/tests/test1222.pl @@ -269,7 +269,7 @@ for(@hfiles) { # Get function statuses from man pages. foreach my $sym (keys %hdr) { - if($sym =~/^(?:curl|curlx)_\w/) { + if($sym =~ /^(?:curl|curlx)_\w/) { scan_man_page("$libdocdir/$sym.3", $sym, \%funcman); } } diff --git a/tests/testutil.pm b/tests/testutil.pm index d337f71cde..a5e79df58d 100644 --- a/tests/testutil.pm +++ b/tests/testutil.pm @@ -195,7 +195,7 @@ sub subnewlines { } else { if(($$thing =~ /^\n\z/) && $prevupdate) { - # if there is a blank link after a line we update, we hope it is + # if there is a blank line after a line we update, we hope it is # the empty line following headers $$thing =~ s/\x0a/\x0d\x0a/; } diff --git a/tests/unit/unit1300.c b/tests/unit/unit1300.c index 5db667cdf2..7f0ec0d0c7 100644 --- a/tests/unit/unit1300.c +++ b/tests/unit/unit1300.c @@ -59,10 +59,10 @@ static CURLcode test_unit1300(const char *arg) * case 1: * list initiation * @assumptions: - * 1: list size will be 0 - * 2: list head will be NULL - * 3: list tail will be NULL - * 4: list dtor will be NULL + * 1: list size is 0 + * 2: list head is NULL + * 3: list tail is NULL + * 4: list dtor is NULL */ fail_unless(Curl_llist_count(&llist) == 0, @@ -77,9 +77,9 @@ static CURLcode test_unit1300(const char *arg) * case 1: * list is empty * @assumptions: - * 1: list size will be 1 - * 2: list head will hold the data "unusedData_case1" - * 3: list tail will be the same as list head + * 1: list size is 1 + * 2: list head holds the data "unusedData_case1" + * 3: list tail is the same as list head */ Curl_llist_insert_next(&llist, Curl_llist_head(&llist), &unusedData_case1, @@ -135,9 +135,9 @@ static CURLcode test_unit1300(const char *arg) * case 1: * list has >1 element, removing head * @assumptions: - * 1: list size will be decremented by one - * 2: head will be the head->next - * 3: "new" head's previous will be NULL + * 1: list size is decremented by one + * 2: head is head->next + * 3: "new" head's previous is NULL */ head = Curl_llist_head(&llist); @@ -161,9 +161,9 @@ static CURLcode test_unit1300(const char *arg) * @setup: * 1: insert another element to the list to make element >=2 * @assumptions: - * 1: list size will be decremented by one ; tested - * 2: element->previous->next will be element->next - * 3: element->next->previous will be element->previous + * 1: list size is decremented by one ; tested + * 2: element->previous->next is element->next + * 3: element->next->previous is element->previous */ Curl_llist_insert_next(&llist, Curl_llist_head(&llist), &unusedData_case3, &case4_list); @@ -185,10 +185,10 @@ static CURLcode test_unit1300(const char *arg) * case 3: * removing the tail with list having >=1 element * @assumptions - * 1: list size will be decremented by one ;tested - * 2: element->previous->next will be element->next ;tested - * 3: element->next->previous will be element->previous ;tested - * 4: list->tail will be tail->previous + * 1: list size is decremented by one ;tested + * 2: element->previous->next is element->next ;tested + * 3: element->next->previous is element->previous ;tested + * 4: list->tail is tail->previous */ to_remove = llist_tail(&llist); @@ -201,9 +201,9 @@ static CURLcode test_unit1300(const char *arg) * case 4: * removing head with list having 1 element * @assumptions: - * 1: list size will be decremented by one ;tested - * 2: list head will be null - * 3: list tail will be null + * 1: list size is decremented by one ;tested + * 2: list head is NULL + * 3: list tail is NULL */ to_remove = Curl_llist_head(&llist); diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c index 628bfab9cc..93f2e7cc7b 100644 --- a/tests/unit/unit1305.c +++ b/tests/unit/unit1305.c @@ -110,10 +110,10 @@ static CURLcode test_unit1305(const char *arg) abort_unless(result == CURLE_OK, "data node creation failed"); key_len = strlen(data_key); - data_node->refcount = 1; /* hash will hold the reference */ + data_node->refcount = 1; /* hash holds the reference */ nodep = Curl_hash_add(&hp.entries, data_key, key_len + 1, data_node); abort_unless(nodep, "insertion into hash failed"); - /* Freeing will now be done by Curl_hash_destroy */ + /* Freeing is done now by Curl_hash_destroy */ data_node = NULL; } diff --git a/tests/unit/unit1603.c b/tests/unit/unit1603.c index 9d7d950d32..6ba89999c0 100644 --- a/tests/unit/unit1603.c +++ b/tests/unit/unit1603.c @@ -77,7 +77,7 @@ static CURLcode test_unit1603(const char *arg) Curl_hash_str(key4, strlen(key4), slots) != 1) curl_mfprintf(stderr, "Warning: hashes are not computed as expected on this " - "architecture; test coverage will be less comprehensive\n"); + "architecture; test coverage is less comprehensive\n"); nodep = Curl_hash_add(&hash_static, &key1, strlen(key1), &key1); fail_unless(nodep, "insertion into hash failed"); diff --git a/tests/unit/unit1609.c b/tests/unit/unit1609.c index 39ad6f90aa..1132a1a7cf 100644 --- a/tests/unit/unit1609.c +++ b/tests/unit/unit1609.c @@ -45,9 +45,10 @@ static CURLcode t1609_setup(void) time request is made, it can get expired. This happens because, when we set address using CURLOPT_RESOLVE, it usually marks as permanent (by setting timestamp to zero). However, - if address already exists - in the cache, then it does not mark it, but leaves it as it is. - So we fixing this by timestamp to zero if address already exists too. + if address already exists in the cache, then it does not mark it, but + leaves it as it is. + We are fixing this by setting timestamp to zero if address already + exists too. Test: diff --git a/tests/unit/unit1652.c b/tests/unit/unit1652.c index 3b1a5a99ae..312fe8a4b0 100644 --- a/tests/unit/unit1652.c +++ b/tests/unit/unit1652.c @@ -116,7 +116,7 @@ static CURLcode test_unit1652(const char *arg) * get out of it is 2047, since we need a \0 at the end. * Curl_infof() in addition adds a \n at the end, making the effective * output 2046 characters. - * Any input that long or longer will truncated, ending in '...\n'. + * Any input that long or longer is truncated, ending in '...\n'. */ /* A string long enough to not be truncated */ diff --git a/tests/unit/unit1661.c b/tests/unit/unit1661.c index c679fef3e7..a12b72d740 100644 --- a/tests/unit/unit1661.c +++ b/tests/unit/unit1661.c @@ -56,9 +56,9 @@ static CURLcode test_unit1661(const char *arg) /** * testing Curl_bufref_init. * @assumptions: - * 1: data size will be 0 - * 2: reference will be NULL - * 3: destructor will be NULL + * 1: data size is 0 + * 2: reference is NULL + * 3: destructor is NULL */ fail_unless(!bufref.ptr, "Initial reference must be NULL"); fail_unless(!bufref.len, "Initial length must be NULL"); diff --git a/tests/unit/unit1674.c b/tests/unit/unit1674.c index cfb751cb00..51870892fd 100644 --- a/tests/unit/unit1674.c +++ b/tests/unit/unit1674.c @@ -28,7 +28,7 @@ #include "urldata.h" #include "hsts.h" -/* create a HSTS file with lots of unique host names all using the same +/* create a HSTS file with lots of unique hostnames all using the same fixed expire time */ static void render_unit1674(const char *file) { diff --git a/tests/unit/unit3205.c b/tests/unit/unit3205.c index 9d448e1f78..039b679d0a 100644 --- a/tests/unit/unit3205.c +++ b/tests/unit/unit3205.c @@ -557,7 +557,7 @@ static CURLcode test_unit3205(const char *arg) Curl_cipher_suite_get_str(test->id, buf, sizeof(buf), FALSE); - /* suites matched by EDH alias will return the DHE name */ + /* suites matched by EDH alias return the DHE name */ if(test->id >= 0x0011 && test->id < 0x0017) { if(expect && !memcmp(expect, "EDH-", 4)) { curlx_strcopy(alt, sizeof(alt), expect, strlen(expect)); diff --git a/tests/unit/unit3300.c b/tests/unit/unit3300.c index f6d7ed34ce..6df79097c4 100644 --- a/tests/unit/unit3300.c +++ b/tests/unit/unit3300.c @@ -84,7 +84,7 @@ static CURLcode test_unit3300(const char *arg) struct unit3300_ctx ctx; CURLcode result; - /* pool without minimum, will not start anything */ + /* pool without minimum, does not start anything */ unit3300_ctx_init(&ctx, 10, 0); result = Curl_thrdpool_create(&tpool, "unit3300a", 0, 2, 0, unit3300_take, unit3300_process, @@ -143,10 +143,10 @@ static CURLcode test_unit3300(const char *arg) fail_unless(ctx.returned < ctx.total, "pool-e returned all"); fail_unless(ctx.taken < ctx.total, "pool-e took all"); #ifdef DEBUGBUILD - /* pool thread will notice destruction and should immediately abort. + /* pool thread notices destruction and should immediately abort. * No memory leak should be reported. if the wait is too short on - * a slow system, thread sanitizer will freak out as memdebug will - * be called by threads after main thread shut down. */ + * a slow system, thread sanitizer freaks out as memdebug + * is called by threads after main thread shut down. */ curlx_wait_ms(1000); #endif