Hello,

yet another spelling fix.

Ilya
From d6a14fe0c224e083a6226a985078f7e1acf11d03 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <[email protected]>
Date: Sat, 29 Oct 2022 09:34:32 +0500
Subject: [PATCH] CLEANUP: assorted typo fixes in the code and comments

This is 32nd iteration of typo fixes
---
 admin/wireshark-dissectors/peers/README |  2 +-
 doc/design-thoughts/thread-group.txt    |  6 +++---
 doc/internals/api/htx-api.txt           |  2 +-
 doc/lua-api/index.rst                   |  2 +-
 include/haproxy/acl-t.h                 |  2 +-
 include/haproxy/http_ana-t.h            |  2 +-
 include/haproxy/list.h                  |  2 +-
 include/haproxy/pattern-t.h             |  2 +-
 include/haproxy/queue.h                 |  2 +-
 include/haproxy/quic_loss-t.h           |  2 +-
 include/haproxy/tcpcheck-t.h            |  2 +-
 include/import/ebmbtree.h               |  2 +-
 scripts/make-releases-json              |  2 +-
 src/cfgparse-quic.c                     |  2 +-
 src/cfgparse.c                          |  2 +-
 src/clock.c                             |  2 +-
 src/errors.c                            |  2 +-
 src/hlua.c                              |  2 +-
 src/http_ana.c                          |  2 +-
 src/mux_h1.c                            |  2 +-
 src/peers.c                             |  4 ++--
 src/quic_conn.c                         | 10 +++++-----
 src/quic_sock.c                         |  2 +-
 src/quic_stats.c                        |  2 +-
 src/quic_tp.c                           |  4 ++--
 25 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/admin/wireshark-dissectors/peers/README b/admin/wireshark-dissectors/peers/README
index 83b57d298..95a360312 100644
--- a/admin/wireshark-dissectors/peers/README
+++ b/admin/wireshark-dissectors/peers/README
@@ -62,7 +62,7 @@ install it this way:
 $ make install plugins=~/.local/lib/wireshark/plugins/3.2/epan/
 
 If you want to install it in the system directory you can do it this way, the
-righ path is also in the Folder window. Change the plugins variable this way:
+right path is also in the Folder window. Change the plugins variable this way:
 
 $ sudo make install plugins=/usr/lib64/wireshark/plugins/3.2/epan/
 
diff --git a/doc/design-thoughts/thread-group.txt b/doc/design-thoughts/thread-group.txt
index 9ab1f556d..e845230fa 100644
--- a/doc/design-thoughts/thread-group.txt
+++ b/doc/design-thoughts/thread-group.txt
@@ -339,18 +339,18 @@ fd_takeover():                                    |    do {
    old = {running, thread};                       |          return -1;
    new = {tid_bit, tid_bit};                      |       new = { running | tid_bit, old.thread }	 
    if (owner != expected) {                       |    } while (!dwcas({running, thread}, &old, &new));
-      atomic_and(runnning, ~tid_bit);             |
+      atomic_and(running, ~tid_bit);              |
       return -1; // fail                          | fd_clr_running():
    }                                              |    return atomic_and_fetch(running, ~tid_bit);
                                                   |
    while (old == {tid_bit, !=0 })                 | poll():
       if (dwcas({running, thread}, &old, &new)) { |    if (!owner)
-         atomic_and(runnning, ~tid_bit);          |       continue;
+         atomic_and(running, ~tid_bit);           |       continue;
          return 0; // success                     |
       }                                           |    if (!(thread_mask & tid_bit)) {
    }                                              |       epoll_ctl_del();
                                                   |       continue;
-   atomic_and(runnning, ~tid_bit);                |    }
+   atomic_and(running, ~tid_bit);                 |    }
    return -1; // fail                             |
                                                   |    // via fd_update_events()
 fd_delete():                                      |    if (fd_set_running() != -1) {
diff --git a/doc/internals/api/htx-api.txt b/doc/internals/api/htx-api.txt
index 971328bb9..62b3093f4 100644
--- a/doc/internals/api/htx-api.txt
+++ b/doc/internals/api/htx-api.txt
@@ -267,7 +267,7 @@ message. For HTTP/1 messages, it is the message body without the chunks
 formatting, if any. For HTTP/2, it is the payload of DATA frames.
 
 The DATA blocks are the only HTX blocks that may be partially processed (copied
-or removed). All other types of block must be entierly processed. This means
+or removed). All other types of block must be entirely processed. This means
 DATA blocks can be resized.
 
 
diff --git a/doc/lua-api/index.rst b/doc/lua-api/index.rst
index 072b56b06..70dbf63ba 100644
--- a/doc/lua-api/index.rst
+++ b/doc/lua-api/index.rst
@@ -119,7 +119,7 @@ On other terminal, you can test with telnet:
 Usage of load parameters
 ------------------------
 
-HAProxy lua-load(-per-thread) directives allow a list of paramaters after
+HAProxy lua-load(-per-thread) directives allow a list of parameters after
 the lua file name. These parameters are accessible through an array of args
 using this code `local args = table.pack(...)` in the body of loaded file.
 
diff --git a/include/haproxy/acl-t.h b/include/haproxy/acl-t.h
index 3dec96d17..5bae443c4 100644
--- a/include/haproxy/acl-t.h
+++ b/include/haproxy/acl-t.h
@@ -30,7 +30,7 @@
  * We're using a 3-state matching system :
  *   - PASS : at least one pattern already matches
  *   - MISS : some data is missing to decide if some rules may finally match.
- *   - FAIL : no mattern may ever match
+ *   - FAIL : no pattern may ever match
  *
  * We assign values 0, 1 and 3 to FAIL, MISS and PASS respectively, so that we
  * can make use of standard arithmetic for the truth tables below :
diff --git a/include/haproxy/http_ana-t.h b/include/haproxy/http_ana-t.h
index b9d65ec3b..c85deb92a 100644
--- a/include/haproxy/http_ana-t.h
+++ b/include/haproxy/http_ana-t.h
@@ -31,7 +31,7 @@
 /* action flags.
  * Please also update the txn_show_flags() function below in case of changes.
  */
-/* Unusued: 0x00000001..0x00000004 */
+/* Unused: 0x00000001..0x00000004 */
 #define TX_CONST_REPLY  0x00000008      /* The http reply must not be rewritten (don't eval after-response ruleset) */
 #define TX_CLTARPIT	0x00000010	/* the transaction is tarpitted (anti-dos) */
 
diff --git a/include/haproxy/list.h b/include/haproxy/list.h
index 6d3de64e0..dc4f7e0e1 100644
--- a/include/haproxy/list.h
+++ b/include/haproxy/list.h
@@ -863,7 +863,7 @@
 								 * (tmpelt2.prev == NULL on first run)              \
 								 */                                                 \
 								_MT_LIST_UNLOCK_PREV(tmpelt, tmpelt2.prev);         \
-								/* unlock_prev will implicitely relink:             \
+								/* unlock_prev will implicitly relink:              \
 								 * elt->prev = prev                                 \
 								 * prev->next = elt                                 \
 								 */                                                 \
diff --git a/include/haproxy/pattern-t.h b/include/haproxy/pattern-t.h
index 32802d41c..1d1de602f 100644
--- a/include/haproxy/pattern-t.h
+++ b/include/haproxy/pattern-t.h
@@ -36,7 +36,7 @@
  * ACLs :
  *   - PASS : at least one pattern already matches
  *   - MISS : some data is missing to decide if some rules may finally match.
- *   - FAIL : no mattern may ever match
+ *   - FAIL : no pattern may ever match
  *
  * We assign values 0, 1 and 3 to FAIL, MISS and PASS respectively, so that we
  * can make use of standard arithmetic for the truth tables below :
diff --git a/include/haproxy/queue.h b/include/haproxy/queue.h
index 847896545..e77370cdd 100644
--- a/include/haproxy/queue.h
+++ b/include/haproxy/queue.h
@@ -45,7 +45,7 @@ void pendconn_unlink(struct pendconn *p);
  * function to be used by default when unsure. Do not call it with server
  * or proxy locks held however. Warning: this is called from stream_free()
  * which may run concurrently with pendconn_process_next_strm() which can be
- * dequeing the entry. The function must not return until the pendconn is
+ * dequeuing the entry. The function must not return until the pendconn is
  * guaranteed not to be known, which means that we must check its presence
  * in the tree under the queue's lock so that penconn_process_next_strm()
  * finishes before we return in case it would have grabbed this pendconn. See
diff --git a/include/haproxy/quic_loss-t.h b/include/haproxy/quic_loss-t.h
index 9d2576f46..4fb20847f 100644
--- a/include/haproxy/quic_loss-t.h
+++ b/include/haproxy/quic_loss-t.h
@@ -39,7 +39,7 @@
 #define QUIC_LOSS_TIME_THRESHOLD_MULTIPLICAND 9
 #define QUIC_LOSS_TIME_THRESHOLD_DIVISOR      8
 
-/* Note that all the unit of variables for QUIC LOSS dectections
+/* Note that all the unit of variables for QUIC LOSS detections
  * is the tick.
  */
 
diff --git a/include/haproxy/tcpcheck-t.h b/include/haproxy/tcpcheck-t.h
index 2b9de1f53..b32d13f35 100644
--- a/include/haproxy/tcpcheck-t.h
+++ b/include/haproxy/tcpcheck-t.h
@@ -35,7 +35,7 @@
 #define TCPCHK_OPT_DEFAULT_CONNECT 0x0008  /* Do a connect using server params */
 #define TCPCHK_OPT_IMPLICIT        0x0010  /* Implicit connect */
 #define TCPCHK_OPT_SOCKS4          0x0020  /* check the connection via socks4 proxy */
-#define TCPCHK_OPT_HAS_DATA        0x0040  /* data should be sent after conncetion */
+#define TCPCHK_OPT_HAS_DATA        0x0040  /* data should be sent after connection */
 
 enum tcpcheck_send_type {
 	TCPCHK_SEND_UNDEF = 0,  /* Send is not parsed. */
diff --git a/include/import/ebmbtree.h b/include/import/ebmbtree.h
index 0e23539d1..b2dd1447a 100644
--- a/include/import/ebmbtree.h
+++ b/include/import/ebmbtree.h
@@ -111,7 +111,7 @@ static inline struct ebmb_node *ebmb_lookup_shorter(struct ebmb_node *start)
 	eb_troot_t *t = start->node.leaf_p;
 	struct ebmb_node *node;
 
-	/* first, chcek for duplicates */
+	/* first, check for duplicates */
 	node = ebmb_next_dup(start);
 	if (node)
 		return node;
diff --git a/scripts/make-releases-json b/scripts/make-releases-json
index 38bb2b612..ba056652e 100755
--- a/scripts/make-releases-json
+++ b/scripts/make-releases-json
@@ -2,7 +2,7 @@
 #
 # Scan a branch directory for source tarballs and rebuild the releases.json
 # file for that branch. md5 and sha256 are added if present. The highest
-# numberred version is referenced as the latest release.
+# numbered version is referenced as the latest release.
 #
 # Usage: $0 [-b branch] [-o outfile] /path/to/download/branch
 #
diff --git a/src/cfgparse-quic.c b/src/cfgparse-quic.c
index f6706f2e0..ee23dc8e1 100644
--- a/src/cfgparse-quic.c
+++ b/src/cfgparse-quic.c
@@ -22,7 +22,7 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px,
 	struct quic_cc_algo *cc_algo;
 
 	if (!*args[cur_arg + 1]) {
-		memprintf(err, "'%s' : missing control congestion algorith", args[cur_arg]);
+		memprintf(err, "'%s' : missing control congestion algorithm", args[cur_arg]);
 		return ERR_ALERT | ERR_FATAL;
 	}
 
diff --git a/src/cfgparse.c b/src/cfgparse.c
index f80008c25..a7652e9e3 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -2020,7 +2020,7 @@ int readcfgfile(const char *file)
 					qfprintf(stdout, "%s %s\n", args[0], args[1]);
 				}
 
-				/* It concerns user in global secion and in userlist */
+				/* It concerns user in global section and in userlist */
 				else if (strcmp(args[0], "user") == 0) {
 					qfprintf(stdout, "%s %s ", args[0], HA_ANON_ID(g_key, args[1]));
 
diff --git a/src/clock.c b/src/clock.c
index bdbe3ccdc..eac425151 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -348,7 +348,7 @@ void clock_leaving_poll(int timeout, int interrupted)
 
 /* Collect date and time information before calling poll(). This will be used
  * to count the run time of the past loop and the sleep time of the next poll.
- * It also compares the elasped and cpu times during the activity period to
+ * It also compares the elapsed and cpu times during the activity period to
  * estimate the amount of stolen time, which is reported if higher than half
  * a millisecond.
  */
diff --git a/src/errors.c b/src/errors.c
index 96ed60d2a..8221adb0e 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -105,7 +105,7 @@ static struct ring *startup_logs_from_fd(int fd, int new)
 }
 
 /*
- * Use a shm accross reexec of the master.
+ * Use a shm across reexec of the master.
  *
  * During the startup of the master, a shm_open must be done and the FD saved
  * into the HAPROXY_STARTUPLOGS_FD environment variable.
diff --git a/src/hlua.c b/src/hlua.c
index 9b646bc20..b8f727f1f 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -3966,7 +3966,7 @@ __LJMP static int hlua_channel_forward_yield(lua_State *L, int status, lua_KCont
 		else
 			HLUA_SET_WAKEREQWR(hlua);
 
-		/* Otherwise, we can yield waiting for new data in the inpout side. */
+		/* Otherwise, we can yield waiting for new data in the input side. */
 		MAY_LJMP(hlua_yieldk(L, 0, 0, hlua_channel_forward_yield, TICK_ETERNITY, 0));
 	}
 
diff --git a/src/http_ana.c b/src/http_ana.c
index 2b2cfdc56..d667f1443 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -4326,7 +4326,7 @@ void http_perform_server_redirect(struct stream *s, struct stconn *sc)
 	location = ist2(trash.area, trash.data);
 
 	/*
-	 * Create the 302 respone
+	 * Create the 302 response
 	 */
 	htx = htx_from_buf(&res->buf);
 	flags = (HTX_SL_F_IS_RESP|HTX_SL_F_VER_11|HTX_SL_F_XFER_LEN|HTX_SL_F_BODYLESS);
diff --git a/src/mux_h1.c b/src/mux_h1.c
index 2dcbf14a7..5511e1b4c 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -849,7 +849,7 @@ static void h1s_destroy(struct h1s *h1s)
 			TRACE_STATE("set idle mode on h1c, waiting for the next request", H1_EV_H1C_ERR, h1c->conn, h1s);
 		}
 		else {
-			TRACE_STATE("set shudown on h1c", H1_EV_H1S_END, h1c->conn, h1s);
+			TRACE_STATE("set shutdown on h1c", H1_EV_H1S_END, h1c->conn, h1s);
 			h1c->flags |= H1C_F_ST_SHUTDOWN;
 		}
 
diff --git a/src/peers.c b/src/peers.c
index 4434fa3bd..8477c43e3 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -2819,7 +2819,7 @@ static inline void init_accepted_peer(struct peer *peer, struct peers *peers)
 		/* if st->update appears to be in future it means
 		 * that the last acked value is very old and we
 		 * remain unconnected a too long time to use this
-		 * acknowlegement as a reset.
+		 * acknowledgement as a reset.
 		 * We should update the protocol to be able to
 		 * signal the remote peer that it needs a full resync.
 		 * Here a partial fix consist to set st->update at
@@ -2874,7 +2874,7 @@ static inline void init_connected_peer(struct peer *peer, struct peers *peers)
 		/* if st->update appears to be in future it means
 		 * that the last acked value is very old and we
 		 * remain unconnected a too long time to use this
-		 * acknowlegement as a reset.
+		 * acknowledgement as a reset.
 		 * We should update the protocol to be able to
 		 * signal the remote peer that it needs a full resync.
 		 * Here a partial fix consist to set st->update at
diff --git a/src/quic_conn.c b/src/quic_conn.c
index c10a8ca98..a110e9c23 100644
--- a/src/quic_conn.c
+++ b/src/quic_conn.c
@@ -3112,7 +3112,7 @@ static int qc_prep_pkts(struct quic_conn *qc, struct buffer *buf,
 	TRACE_ENTER(QUIC_EV_CONN_PHPKTS, qc);
 
 	/* Currently qc_prep_pkts() does not handle buffer wrapping so the
-	 * caller must ensure that buf is resetted.
+	 * caller must ensure that buf is reset.
 	 */
 	BUG_ON_HOT(buf->head || buf->data);
 
@@ -3838,7 +3838,7 @@ static inline void qc_rm_hp_pkts(struct quic_conn *qc, struct quic_enc_level *el
 }
 
 /* Process all the CRYPTO frame at <el> encryption level. This is the
- * responsability of the called to ensure there exists a CRYPTO data
+ * responsibility of the called to ensure there exists a CRYPTO data
  * stream for this level.
  * Return 1 if succeeded, 0 if not.
  */
@@ -5461,7 +5461,7 @@ static int quic_generate_retry_token_aad(unsigned char *aad,
 
 /* QUIC server only function.
  * Generate the token to be used in Retry packets. The token is written to
- * <buf> whith <len> as length. <odcid> is the original destination connection
+ * <buf> with <len> as length. <odcid> is the original destination connection
  * ID and <dcid> is our side destination connection ID (or client source
  * connection ID).
  * Returns the length of the encoded token or 0 on error.
@@ -6599,7 +6599,7 @@ static inline int qc_build_frms(struct list *outlist, struct list *inlist,
 				new_cf->crypto.len = dlen;
 				new_cf->crypto.offset = cf->crypto.offset;
 				new_cf->crypto.qel = qel;
-				TRACE_DEVEL("splitted frame", QUIC_EV_CONN_PRSAFRM, qc, new_cf);
+				TRACE_DEVEL("split frame", QUIC_EV_CONN_PRSAFRM, qc, new_cf);
 				if (cf->origin) {
 					TRACE_DEVEL("duplicated frame", QUIC_EV_CONN_PRSAFRM, qc);
 					/* This <cf> frame was duplicated */
@@ -6716,7 +6716,7 @@ static inline int qc_build_frms(struct list *outlist, struct list *inlist,
 				/* FIN bit reset */
 				new_cf->type &= ~QUIC_STREAM_FRAME_TYPE_FIN_BIT;
 				new_cf->stream.data = cf->stream.data;
-				TRACE_DEVEL("splitted frame", QUIC_EV_CONN_PRSAFRM, qc, new_cf);
+				TRACE_DEVEL("split frame", QUIC_EV_CONN_PRSAFRM, qc, new_cf);
 				if (cf->origin) {
 					TRACE_DEVEL("duplicated frame", QUIC_EV_CONN_PRSAFRM, qc);
 					/* This <cf> frame was duplicated */
diff --git a/src/quic_sock.c b/src/quic_sock.c
index 52632fee0..a8da3cb7b 100644
--- a/src/quic_sock.c
+++ b/src/quic_sock.c
@@ -213,7 +213,7 @@ static int quic_lstnr_dgram_dispatch(unsigned char *buf, size_t len, void *owner
  * found or end of the list is hit. The last unused datagram found is not freed
  * and is instead returned so that the caller can reuse it if needed.
  *
- * Returns the last unused datagram or NULL if no occurence found.
+ * Returns the last unused datagram or NULL if no occurrence found.
  */
 static struct quic_dgram *quic_rxbuf_purge_dgrams(struct quic_receiver_buf *buf)
 {
diff --git a/src/quic_stats.c b/src/quic_stats.c
index 652395158..71820d228 100644
--- a/src/quic_stats.c
+++ b/src/quic_stats.c
@@ -16,7 +16,7 @@ static struct name_desc quic_stats[] = {
 	[QUIC_ST_SENDTO_ERR]          = { .name = "quic_sendto_err",
 	                                  .desc = "Total number of error on sendto() calls, EAGAIN excepted" },
 	[QUIC_ST_SENDTO_ERR_UNKNWN]   = { .name = "quic_sendto_err_unknwn",
-	                                  .desc = "Total number of error on sendto() calls not explicitely listed" },
+	                                  .desc = "Total number of error on sendto() calls not explicitly listed" },
 	[QUIC_ST_LOST_PACKET]         = { .name = "quic_lost_pkt",
 	                                  .desc = "Total number of lost sent packets" },
 	[QUIC_ST_TOO_SHORT_INITIAL_DGRAM] = { .name = "quic_too_short_dgram",
diff --git a/src/quic_tp.c b/src/quic_tp.c
index 2be6d5150..485ca2deb 100644
--- a/src/quic_tp.c
+++ b/src/quic_tp.c
@@ -636,8 +636,8 @@ int quic_transport_params_store(struct quic_conn *qc, int server,
 
 /* QUIC server (or haproxy listener) only function.
  * Initialize the local transport parameters <rx_params> from <listener_params>
- * coming from configuration and Initial packet information (destintation
- * connection ID, source connection ID, original destination connection ID from
+ * coming from configuration and Initial packet information (destination
+ * connection ID, source connection ID, original destination connection ID) from
  * client token.
  * Returns 1 if succeeded, 0 if not.
  */
-- 
2.37.3

Reply via email to