From 86f43af95122f49b1fb95e0ad42955af431cae5b Mon Sep 17 00:00:00 2001 From: Patrick Stoeckle Date: Fri, 11 Jul 2025 20:59:53 +0200 Subject: [PATCH] misc: fix typos Just fixing some typos using: https://github.com/crate-ci/typos Closes #17904 --- docs/CURLDOWN.md | 2 +- docs/KNOWN_BUGS | 2 +- docs/cmdline-opts/json.md | 4 ++-- lib/cfilters.h | 2 +- lib/conncache.h | 2 +- lib/cookie.c | 2 +- lib/llist.h | 2 +- lib/multi.c | 4 ++-- lib/pingpong.h | 2 +- lib/smtp.c | 2 +- lib/vquic/curl_ngtcp2.c | 2 +- lib/vtls/x509asn1.c | 2 +- lib/ws.c | 2 +- scripts/cd2nroff | 2 +- scripts/managen | 2 +- tests/http/test_31_vsftpds.py | 2 +- tests/http/test_32_ftps_vsftpd.py | 2 +- tests/libtest/lib2405.c | 4 ++-- tests/unit/unit1658.c | 4 ++-- tests/unit/unit3211.c | 4 ++-- tests/unit/unit3214.c | 2 +- 21 files changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/CURLDOWN.md b/docs/CURLDOWN.md index 378ac6c5a1..6726b3946c 100644 --- a/docs/CURLDOWN.md +++ b/docs/CURLDOWN.md @@ -108,7 +108,7 @@ syntax: ~~~ # NAME - a page - this is a page descriving something + a page - this is a page describing something # SYNOPSIS ~~~c diff --git a/docs/KNOWN_BUGS b/docs/KNOWN_BUGS index 62e9eafd15..ec5c673912 100644 --- a/docs/KNOWN_BUGS +++ b/docs/KNOWN_BUGS @@ -455,7 +455,7 @@ problems may have been fixed or changed somewhat since this was written. 10.2 Does not acknowledge getaddrinfo sorting policy Even if a user edits /etc/gai.conf to prefer IPv4, curl still prefers and - tries IPv6 adresses first. + tries IPv6 addresses first. https://github.com/curl/curl/issues/16718 diff --git a/docs/cmdline-opts/json.md b/docs/cmdline-opts/json.md index c64a9ab124..3f1a9a1b74 100644 --- a/docs/cmdline-opts/json.md +++ b/docs/cmdline-opts/json.md @@ -13,8 +13,8 @@ See-also: - data-binary - data-raw Example: - - --json '{ "drink": "coffe" }' $URL - - --json '{ "drink":' --json ' "coffe" }' $URL + - --json '{ "drink": "coffee" }' $URL + - --json '{ "drink":' --json ' "coffee" }' $URL - --json @prepared $URL - --json @- $URL < json.txt --- diff --git a/lib/cfilters.h b/lib/cfilters.h index 1487ff615f..b28ca998e0 100644 --- a/lib/cfilters.h +++ b/lib/cfilters.h @@ -457,7 +457,7 @@ Curl_conn_get_remote_addr(struct Curl_easy *data, int sockindex); void Curl_conn_forget_socket(struct Curl_easy *data, int sockindex); /** - * Adjust the pollset for the filter chain startgin at `cf`. + * Adjust the pollset for the filter chain starting at `cf`. */ void Curl_conn_cf_adjust_pollset(struct Curl_cfilter *cf, struct Curl_easy *data, diff --git a/lib/conncache.h b/lib/conncache.h index 1314b65c60..ac07111a7d 100644 --- a/lib/conncache.h +++ b/lib/conncache.h @@ -106,7 +106,7 @@ typedef bool Curl_cpool_done_match_cb(bool result, void *userdata); * Find a connection in the pool matching `destination`. * All callbacks are invoked while the pool's lock is held. * @param data current transfer - * @param destination match agaonst `conn->destination` in pool + * @param destination match against `conn->destination` in pool * @param conn_cb must be present, called for each connection in the * bundle until it returns TRUE * @return combined result of last conn_db and result_cb or FALSE if no diff --git a/lib/cookie.c b/lib/cookie.c index 5a3ccdbe07..9221871e4b 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -917,7 +917,7 @@ is_public_suffix(struct Curl_easy *data, Curl_psl_release(data); } else - infof(data, "libpsl problem, rejecting cookie for satety"); + infof(data, "libpsl problem, rejecting cookie for safety"); } if(!acceptable) { diff --git a/lib/llist.h b/lib/llist.h index a865b38f05..0a2bc9a62f 100644 --- a/lib/llist.h +++ b/lib/llist.h @@ -75,7 +75,7 @@ size_t Curl_llist_count(struct Curl_llist *list); void *Curl_node_elem(struct Curl_llist_node *n); /* Remove the node from the list and return the custom data - * from a Curl_llist_node. Will NOT incoke a registered `dtor`. */ + * from a Curl_llist_node. Will NOT invoke a registered `dtor`. */ void *Curl_node_take_elem(struct Curl_llist_node *); /* Curl_node_next() returns the next element in a list from a given diff --git a/lib/multi.c b/lib/multi.c index a1679c7b76..b3a7938e33 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -3042,7 +3042,7 @@ static CURLMcode multi_run_dirty(struct multi_run_ctx *mrc) continue; } else if(!Curl_uint_bset_contains(&multi->process, mid)) { - /* We are no longer proecessing this transfer */ + /* We are no longer processing this transfer */ Curl_uint_bset_remove(&multi->dirty, mid); continue; } @@ -3263,7 +3263,7 @@ static bool multi_has_dirties(struct Curl_multi *multi) if(data) { if(Curl_uint_bset_contains(&multi->process, mid)) return TRUE; - /* We are no longer proecessing this transfer */ + /* We are no longer processing this transfer */ Curl_uint_bset_remove(&multi->dirty, mid); } else { diff --git a/lib/pingpong.h b/lib/pingpong.h index 0665b83659..c6d0a56f0d 100644 --- a/lib/pingpong.h +++ b/lib/pingpong.h @@ -59,7 +59,7 @@ struct pingpong { struct dynbuf recvbuf; size_t overflow; /* number of bytes left after a final response line */ size_t nfinal; /* number of bytes in the final response line, which - after a match is first in the receice buffer */ + after a match is first in the receive buffer */ /* Function pointers the protocols MUST implement and provide for the pingpong layer to function */ diff --git a/lib/smtp.c b/lib/smtp.c index 64fa9654a0..d2adf43a7c 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -2005,7 +2005,7 @@ static CURLcode cr_eob_read(struct Curl_easy *data, eob = &SMTP_EOB[2]; break; case 3: - /* ended with '\r\n.', we should escpe the last '.' */ + /* ended with '\r\n.', we should escape the last '.' */ eob = "." SMTP_EOB; break; default: diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c index 805e52513f..8d99e02211 100644 --- a/lib/vquic/curl_ngtcp2.c +++ b/lib/vquic/curl_ngtcp2.c @@ -1851,7 +1851,7 @@ static CURLcode cf_progress_egress(struct Curl_cfilter *cf, return curlcode; } - /* In UDP, there is a maximum theoretical packet paload length and + /* In UDP, there is a maximum theoretical packet payload length and * a minimum payload length that is "guaranteed" to work. * To detect if this minimum payload can be increased, ngtcp2 sends * now and then a packet payload larger than the minimum. It that diff --git a/lib/vtls/x509asn1.c b/lib/vtls/x509asn1.c index aa0930e3fc..fe47e81a87 100644 --- a/lib/vtls/x509asn1.c +++ b/lib/vtls/x509asn1.c @@ -859,7 +859,7 @@ int Curl_parseX509(struct Curl_X509certificate *cert, if(!getASN1Element(&cert->subjectPublicKey, ccp, cert->subjectPublicKeyInfo.end)) return -1; - /* Get optional issuerUiqueID, subjectUniqueID and extensions. */ + /* Get optional issuerUniqueID, subjectUniqueID and extensions. */ cert->issuerUniqueID.tag = cert->subjectUniqueID.tag = 0; cert->extensions.tag = elem.tag = 0; cert->issuerUniqueID.header = cert->subjectUniqueID.header = NULL; diff --git a/lib/ws.c b/lib/ws.c index 7f8e141def..7f8a688ca1 100644 --- a/lib/ws.c +++ b/lib/ws.c @@ -543,7 +543,7 @@ static CURLcode ws_dec_pass(struct ws_decoder *dec, ws_dec_info(dec, data, "passing"); if(result) return result; - /* paylod parsing done */ + /* payload parsing done */ dec->state = WS_DEC_INIT; break; default: diff --git a/scripts/cd2nroff b/scripts/cd2nroff index b77122f932..d7a5dfe7b0 100755 --- a/scripts/cd2nroff +++ b/scripts/cd2nroff @@ -401,7 +401,7 @@ sub single { push @desc, ".fi\n"; next; } - # convert single backslahes to doubles + # convert single backslashes to doubles $d =~ s/\\/\\\\/g; # lines starting with a period needs it escaped $d =~ s/^\./\\&./; diff --git a/scripts/managen b/scripts/managen index ac54e5e0b6..bf5bca5b1a 100755 --- a/scripts/managen +++ b/scripts/managen @@ -826,7 +826,7 @@ sub single { print ".nf\n"; foreach my $e (@examples) { $e =~ s!\$URL!https://example.com!g; - # convert single backslahes to doubles + # convert single backslashes to doubles $e =~ s/\\/\\\\/g; print "curl $e\n"; } diff --git a/tests/http/test_31_vsftpds.py b/tests/http/test_31_vsftpds.py index bb10f4f14d..8da4a0da92 100644 --- a/tests/http/test_31_vsftpds.py +++ b/tests/http/test_31_vsftpds.py @@ -242,7 +242,7 @@ class TestVsFTPD: assert os.path.exists(dstfile) destdata = open(dstfile).readlines() expdata = [indata] if len(indata) else [] - assert expdata == destdata, f'exected: {expdata}, got: {destdata}' + assert expdata == destdata, f'expected: {expdata}, got: {destdata}' def check_downloads(self, client, srcfile: str, count: int, complete: bool = True): diff --git a/tests/http/test_32_ftps_vsftpd.py b/tests/http/test_32_ftps_vsftpd.py index d44a47d208..663db1381a 100644 --- a/tests/http/test_32_ftps_vsftpd.py +++ b/tests/http/test_32_ftps_vsftpd.py @@ -254,7 +254,7 @@ class TestFtpsVsFTPD: assert os.path.exists(dstfile) destdata = open(dstfile).readlines() expdata = [indata] if len(indata) else [] - assert expdata == destdata, f'exected: {expdata}, got: {destdata}' + assert expdata == destdata, f'expected: {expdata}, got: {destdata}' def check_downloads(self, client, srcfile: str, count: int, complete: bool = True): diff --git a/tests/libtest/lib2405.c b/tests/libtest/lib2405.c index d93dede691..f1db830872 100644 --- a/tests/libtest/lib2405.c +++ b/tests/libtest/lib2405.c @@ -234,7 +234,7 @@ static CURLcode test_run(char *URL, long option, unsigned int *max_fd_count) if(fd_count_chk < fd_count) { curl_mfprintf(stderr, - "curl_multi_waitfds() sould return the amount of fds " + "curl_multi_waitfds() should return the amount of fds " "needed if enough isn't passed in.\n"); res = TEST_ERR_FAILURE; break; @@ -261,7 +261,7 @@ static CURLcode test_run(char *URL, long option, unsigned int *max_fd_count) if(fd_count_chk < fd_count) { curl_mfprintf(stderr, - "curl_multi_waitfds() sould return the amount of fds " + "curl_multi_waitfds() should return the amount of fds " "needed if enough isn't passed in.\n"); res = TEST_ERR_FAILURE; break; diff --git a/tests/unit/unit1658.c b/tests/unit/unit1658.c index ecd856b8b4..9060456fa1 100644 --- a/tests/unit/unit1658.c +++ b/tests/unit/unit1658.c @@ -361,7 +361,7 @@ static CURLcode test_unit1658(char *arg) "r:43|" }, { - "alpn + two ipv4 addreses", + "alpn + two ipv4 addresses", (const unsigned char *)"\x00\x10" /* 16-bit prio */ "\x00" /* no RNAME */ "\x00\x01" /* RR (1 == ALPN) */ @@ -376,7 +376,7 @@ static CURLcode test_unit1658(char *arg) "r:0|p:16|.|alpn:10|ipv4:192.168.0.1|ipv4:192.168.0.2|" }, { - "alpn + two ipv4 addreses in wrong order", + "alpn + two ipv4 addresses in wrong order", (const unsigned char *)"\x00\x10" /* 16-bit prio */ "\x00" /* no RNAME */ "\x00\x04" /* RR (4 == Ipv4hints) */ diff --git a/tests/unit/unit3211.c b/tests/unit/unit3211.c index efb58e95a3..444912a21e 100644 --- a/tests/unit/unit3211.c +++ b/tests/unit/unit3211.c @@ -106,14 +106,14 @@ static void check_set(const char *name, unsigned int capacity, fail_unless(Curl_uint_bset_contains(&bset, s[i]), "unexpectedly lost"); fail_unless(!Curl_uint_bset_resize(&bset, capacity/2), "resize half failed"); - /* halfed the size, what numbers remain in set? */ + /* halved the size, what numbers remain in set? */ c = Curl_uint_bset_capacity(&bset); n = 0; for(i = 0; i < slen; ++i) { if(s[i] < c) ++n; } - fail_unless(n == Curl_uint_bset_count(&bset), "set count(halfed) wrong"); + fail_unless(n == Curl_uint_bset_count(&bset), "set count(halved) wrong"); for(i = 0; i < n; i++) /* still present after resize half */ fail_unless(Curl_uint_bset_contains(&bset, s[i]), "unexpectedly lost"); diff --git a/tests/unit/unit3214.c b/tests/unit/unit3214.c index aff1292bb2..fa65b06c58 100644 --- a/tests/unit/unit3214.c +++ b/tests/unit/unit3214.c @@ -65,7 +65,7 @@ static CURLcode test_unit3214(char *arg) checksize("Curl_multi", sizeof(struct Curl_multi), MAX_CURL_MULTI); /* public structs MUST NOT change (unless controlled), but exact sizes - depend on architecure */ + depend on architecture */ checksize("curl_httppost", sizeof(struct curl_httppost), MAX_CURL_HTTPPOST); checksize("curl_slist", sizeof(struct curl_slist), MAX_CURL_SLIST); checksize("curl_khkey", sizeof(struct curl_khkey), MAX_CURL_KHKEY); -- 2.39.5