CLEANUP: assorted typo fixes in the code and comments
This is 9th iteration of typo fixes
diff --git a/src/checks.c b/src/checks.c
index bb78cc8..0fefdc5 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -1061,7 +1061,7 @@
* 1. if info field is already provided, copy it
* 2. if the expect rule provides an onerror log-format string,
* use it to produce the message
- * 3. the expect rule is part of a protcol check (http, redis, mysql...), do nothing
+ * 3. the expect rule is part of a protocol check (http, redis, mysql...), do nothing
* 4. Otherwise produce the generic tcp-check info message
*/
if (istlen(info)) {
@@ -1149,7 +1149,7 @@
* 1. if info field is already provided, copy it
* 2. if the expect rule provides an onsucces log-format string,
* use it to produce the message
- * 3. the expect rule is part of a protcol check (http, redis, mysql...), do nothing
+ * 3. the expect rule is part of a protocol check (http, redis, mysql...), do nothing
* 4. Otherwise produce the generic tcp-check info message
*/
if (istlen(info))
@@ -2080,8 +2080,8 @@
}
-/* Try to reveice data before evaluting a tcp-check expect rule. Returns
- * TCPCHK_EVAL_WAIT if it is already subcribed on receive events or if nothing
+/* Try to receive data before evaluating a tcp-check expect rule. Returns
+ * TCPCHK_EVAL_WAIT if it is already subscribed on receive events or if nothing
* was received, TCPCHK_EVAL_CONTINUE to evaluate the expect rule or
* TCPCHK_EVAL_STOP if an error occurred.
*/
@@ -2582,7 +2582,7 @@
}
/* Evaluates a TCPCHK_ACT_ACTION_KW rule. Returns TCPCHK_EVAL_CONTINUE to
- * evaluate the next rule or TCPCHK_EVAL_STOP if an error occurred. It nevers
+ * evaluate the next rule or TCPCHK_EVAL_STOP if an error occurred. It never
* waits.
*/
static enum tcpcheck_eval_ret tcpcheck_eval_action_kw(struct check *check, struct tcpcheck_rule *rule)
@@ -3728,7 +3728,7 @@
continue;
memprintf(errmsg, "first step MUST also be a 'connect', "
- "optionnaly preceded by a 'set-var', an 'unset-var' or a 'comment', "
+ "optionally preceded by a 'set-var', an 'unset-var' or a 'comment', "
"when there is a 'connect' step in the tcp-check ruleset");
goto error;
}
@@ -4431,7 +4431,7 @@
if (strcmp(args[cur_arg+1], "value-lf") == 0)
flags |= TCPCHK_EXPT_FL_HTTP_HVAL_FMT;
- /* Parse the value pattern, optionnal */
+ /* Parse the value pattern, optional */
if (strcmp(args[cur_arg+2], "-m") == 0) {
cur_arg += 2;
if (!*(args[cur_arg+1])) {
@@ -4919,7 +4919,7 @@
*/
if (chk->action == TCPCHK_ACT_SEND && (chk->send.http.flags & TCPCHK_SND_HTTP_FROM_OPT)) {
- /* Tries to add an implcit http-check send rule from an "option httpchk" line.
+ /* Tries to add an implicit http-check send rule from an "option httpchk" line.
* First, the first rule is retrieved, skipping the first CONNECT, if any, and
* following tests are performed :
*
@@ -4929,7 +4929,7 @@
* 2- If it is another implicit send rule, it is replaced with the new one.
*
* 3- Otherwise, it means it is an explicit send rule. In this case we merge
- * both, overwritting the old send rule (the explicit one) with info of the
+ * both, overwriting the old send rule (the explicit one) with info of the
* new send rule (the implicit one).
*/
r = get_first_tcpcheck_rule(rules);
@@ -5372,7 +5372,7 @@
if (!srv->do_agent)
goto out;
- /* If there is no connect rule preceeding all send / expect rules, an
+ /* If there is no connect rule preceding all send / expect rules, an
* implicit one is inserted before all others.
*/
chk = get_first_tcpcheck_rule(srv->agent.tcpcheck_rules);
@@ -5473,7 +5473,7 @@
/* For all ruleset: */
- /* If there is no connect rule preceeding all send / expect rules, an
+ /* If there is no connect rule preceding all send / expect rules, an
* implicit one is inserted before all others.
*/
chk = get_first_tcpcheck_rule(&px->tcpcheck_rules);
@@ -6351,7 +6351,7 @@
* Check RFC 2246 (TLSv1.0) sections A.3 and A.4 for details.
*/
static char sslv3_client_hello[] = {
- "16" /* ContentType : 0x16 = Hanshake */
+ "16" /* ContentType : 0x16 = Handshake */
"0300" /* ProtocolVersion : 0x0300 = SSLv3 */
"0079" /* ContentLength : 0x79 bytes after this one */
"01" /* HanshakeType : 0x01 = CLIENT HELLO */
diff --git a/src/chunk.c b/src/chunk.c
index 100783e..f2abcba 100644
--- a/src/chunk.c
+++ b/src/chunk.c
@@ -172,7 +172,7 @@
/*
* Encode chunk <src> into chunk <dst>, respecting the limit of at most
- * chk->size chars. Replace non-printable or special chracters with "&#%d;".
+ * chk->size chars. Replace non-printable or special characters with "&#%d;".
* If the chk->len is over, nothing is added. Returns the new chunk size.
*/
int chunk_htmlencode(struct buffer *dst, struct buffer *src)
diff --git a/src/hlua.c b/src/hlua.c
index 67aa2c6..ed987d5 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -343,7 +343,7 @@
/* This function check the number of arguments available in the
* stack. If the number of arguments available is not the same
- * then <nb> an error is throwed.
+ * then <nb> an error is thrown.
*/
__LJMP static inline void check_args(lua_State *L, int nb, char *fcn)
{
@@ -403,7 +403,7 @@
return 1;
}
-/* This function take one entrie in an LUA stack at the index "ud",
+/* This function take one entry in an LUA stack at the index "ud",
* and try to convert it in an HAProxy argument entry. This is useful
* with sample fetch wrappers. The input arguments are given to the
* lua wrapper and converted as arg list by the function.
@@ -588,7 +588,7 @@
* is in accord with the expected argp defined by the "mask". The function
* returns true or false. It can be adjust the types if there compatibles.
*
- * This function assumes thant the argp argument contains ARGM_NBARGS + 1
+ * This function assumes that the argp argument contains ARGM_NBARGS + 1
* entries.
*/
__LJMP int hlua_lua2arg_check(lua_State *L, int first, struct arg *argp,
@@ -802,7 +802,7 @@
}
/*
- * The following functions are used to make correspondance between the the
+ * The following functions are used to make correspondence between the the
* executed lua pointer and the "struct hlua *" that contain the context.
*
* - hlua_gethlua : return the hlua context associated with an lua_State.
@@ -1337,7 +1337,7 @@
/* A class is a lot of memory that contain data. This data can be a table,
* an integer or user data. This data is associated with a metatable. This
- * metatable have an original version registred in the global context with
+ * metatable have an original version registered in the global context with
* the name of the object (_G[<name>] = <metable> ).
*
* A metable is a table that modify the standard behavior of a standard
diff --git a/src/http_act.c b/src/http_act.c
index e9f5800..e6e3df4 100644
--- a/src/http_act.c
+++ b/src/http_act.c
@@ -71,7 +71,7 @@
/* This function executes one of the set-{method,path,query,uri} actions. It
* builds a string in the trash from the specified format string. It finds
* the action to be performed in <.action>, previously filled by function
- * parse_set_req_line(). The replacement action is excuted by the function
+ * parse_set_req_line(). The replacement action is executed by the function
* http_action_set_req_line(). On success, it returns ACT_RET_CONT. If an error
* occurs while soft rewrites are enabled, the action is canceled, but the rule
* processing continue. Otherwsize ACT_RET_ERR is returned.
@@ -1071,7 +1071,7 @@
/* This function executes a early-hint action. It adds an HTTP Early Hint HTTP
* 103 response header with <.arg.http.str> name and with a value built
* according to <.arg.http.fmt> log line format. If it is the first early-hint
- * rule of a serie, the 103 response start-line is added first. At the end, if
+ * rule of series, the 103 response start-line is added first. At the end, if
* the next rule is not an early-hint rule or if it is the last rule, the EOH
* block is added to terminate the response. On success, it returns
* ACT_RET_CONT. If an error occurs while soft rewrites are enabled, the action
@@ -1148,7 +1148,7 @@
/* This function executes a set-header or add-header actions. It builds a string
* in the trash from the specified format string. It finds the action to be
* performed in <.action>, previously filled by function parse_set_header(). The
- * replacement action is excuted by the function http_action_set_header(). On
+ * replacement action is executed by the function http_action_set_header(). On
* success, it returns ACT_RET_CONT. If an error occurs while soft rewrites are
* enabled, the action is canceled, but the rule processing continue. Otherwsize
* ACT_RET_ERR is returned.
@@ -1271,7 +1271,7 @@
/* This function executes a replace-header or replace-value actions. It
* builds a string in the trash from the specified format string. It finds
* the action to be performed in <.action>, previously filled by function
- * parse_replace_header(). The replacement action is excuted by the function
+ * parse_replace_header(). The replacement action is executed by the function
* http_action_replace_header(). On success, it returns ACT_RET_CONT. If an error
* occurs while soft rewrites are enabled, the action is canceled, but the rule
* processing continue. Otherwsize ACT_RET_ERR is returned.
@@ -2019,7 +2019,7 @@
*
* - action 0 : dummy response, no payload
* - action 1 : implicit error message depending on the status code or explicit one
- * - action 2 : explicit file oject ('file' argument)
+ * - action 2 : explicit file object ('file' argument)
* - action 3 : explicit log-format string ('content' argument)
*
* The content-type must be defined for non-empty payload. It is ignored for
diff --git a/src/mux_h1.c b/src/mux_h1.c
index 0421bba..f9048b1 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -356,7 +356,7 @@
* - if the input buffer failed to be allocated or is full , we must not try
* to receive
* - if he input processing is busy waiting for the output side, we may
- * attemp to receive
+ * attempt to receive
* - otherwise must may not attempt to receive
*/
static inline int h1_recv_allowed(const struct h1c *h1c)
@@ -845,7 +845,7 @@
}
else if (!(h1m->flags & H1_MF_CONN_KAL) &&
(fe->options & PR_O_HTTP_MODE) == PR_O_HTTP_CLO) {
- /* no explict keep-alive and option httpclose => close */
+ /* no explicit keep-alive and option httpclose => close */
h1s->flags = (h1s->flags & ~H1S_F_WANT_MSK) | H1S_F_WANT_CLO;
TRACE_STATE("force close mode (resp)", H1_EV_TX_DATA|H1_EV_TX_HDRS, h1s->h1c->conn, h1s);
}
@@ -1136,7 +1136,7 @@
/*
* Switch the response to tunnel mode. This function must only be called on
- * successfull replies to CONNECT requests or on protocol switching. In this
+ * successful replies to CONNECT requests or on protocol switching. In this
* last case, this function takes care to switch the request to tunnel mode if
* possible. On the server side, if the request is not finished, the mux is mark
* as busy on input.
@@ -1779,7 +1779,7 @@
}
else if ((h1m->flags & H1_MF_RESP) &&
((h1s->meth == HTTP_METH_CONNECT && h1s->status == 200) || h1s->status == 101)) {
- /* a successfull reply to a CONNECT or a protocol switching is sent
+ /* a successful reply to a CONNECT or a protocol switching is sent
* to the client. Switch the response to tunnel mode.
*/
h1_set_res_tunnel_mode(h1s);
@@ -3104,7 +3104,7 @@
/****************************************/
-/* MUX initialization and instanciation */
+/* MUX initialization and instantiation */
/****************************************/
/* The mux operations */
diff --git a/src/peers.c b/src/peers.c
index 3bed8a6..2e54ab9 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -159,7 +159,7 @@
/*******************************/
/* stick table sync mesg types */
/* Note: ids >= 128 contains */
-/* id message cotains data */
+/* id message contains data */
/*******************************/
#define PEER_MSG_STKT_UPDATE 0x80
#define PEER_MSG_STKT_INCUPDATE 0x81
@@ -280,7 +280,7 @@
/* This function encode an uint64 to 'dynamic' length format.
The encoded value is written at address *str, and the
- caller must assure that size after *str is large enought.
+ caller must assure that size after *str is large enough.
At return, the *str is set at the next Byte after then
encoded integer. The function returns then length of the
encoded integer in Bytes */
@@ -449,7 +449,7 @@
/* construct message */
- /* check if we need to send the update identifer */
+ /* check if we need to send the update identifier */
if (!st->last_pushed || updateid < st->last_pushed || ((updateid - st->last_pushed) != 1)) {
use_identifier = 1;
}
@@ -1302,7 +1302,7 @@
* was encountered.
* <exp> must be set if the stick-table entry expires.
* <updt> must be set for PEER_MSG_STKT_UPDATE or PEER_MSG_STKT_UPDATE_TIMED stick-table
- * messages, in this case the stick-table udpate message is received with a stick-table
+ * messages, in this case the stick-table update message is received with a stick-table
* update ID.
* <totl> is the length of the stick-table update message computed upon receipt.
*/
@@ -1778,7 +1778,7 @@
struct shared_table *st;
/* Reset message: remote need resync */
- /* prepare tables fot a global push */
+ /* prepare tables for a global push */
for (st = peer->tables; st; st = st->next) {
st->teaching_origin = st->last_pushed = st->table->update;
st->flags = 0;
@@ -1871,7 +1871,7 @@
/*
* Send any message to <peer> peer.
* Returns 1 if succeeded, or -1 or 0 if failed.
- * -1 means an internal error occured, 0 is for a peer protocol error leading
+ * -1 means an internal error occurred, 0 is for a peer protocol error leading
* to a peer state change (from the peer I/O handler point of view).
*/
static inline int peer_send_msgs(struct appctx *appctx, struct peer *peer)
@@ -2855,7 +2855,7 @@
/*
* Allocate a cache of dictionary entries with <name> as name and <max_entries>
* as maximum of entries.
- * Return the dictionay cache if succeeded, NULL if not.
+ * Return the dictionary cache if succeeded, NULL if not.
* Must be deallocated calling free_dcache().
*/
static struct dcache *new_dcache(size_t max_entries)
diff --git a/src/server.c b/src/server.c
index 9e74fa4..265106e 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1277,7 +1277,7 @@
INITCALL1(STG_REGISTER, srv_register_keywords, &srv_kws);
/* Recomputes the server's eweight based on its state, uweight, the current time,
- * and the proxy's algorihtm. To be used after updating sv->uweight. The warmup
+ * and the proxy's algorithm. To be used after updating sv->uweight. The warmup
* state is automatically disabled if the time is elapsed. If <must_update> is
* not zero, the update will be propagated immediately.
*
@@ -2248,7 +2248,7 @@
len2mask6(mask, &opt->pref_net[opt->pref_net_nb].mask.in6);
opt->pref_net[opt->pref_net_nb].family = AF_INET6;
} else {
- /* All network conversions fail, retrun error. */
+ /* All network conversions fail, return error. */
ha_alert("parsing [%s:%d]: '%s': invalid network '%s'.\n",
file, linenum, args[cur_arg], p);
err_code |= ERR_ALERT | ERR_FATAL;
diff --git a/src/standard.c b/src/standard.c
index 1bca318..701bcc2 100644
--- a/src/standard.c
+++ b/src/standard.c
@@ -2292,7 +2292,7 @@
return NULL;
}
-/* get length of the initial segment consiting entirely of bytes in <accept> */
+/* get length of the initial segment consisting entirely of bytes in <accept> */
size_t my_memspn(const void *str, size_t len, const void *accept, size_t acceptlen)
{
size_t ret = 0;
@@ -2304,7 +2304,7 @@
return ret;
}
-/* get length of the initial segment consiting entirely of bytes not in <rejcet> */
+/* get length of the initial segment consisting entirely of bytes not in <rejcet> */
size_t my_memcspn(const void *str, size_t len, const void *reject, size_t rejectlen)
{
size_t ret = 0;
diff --git a/src/stream.c b/src/stream.c
index 4822387..f7ed26f 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -970,7 +970,7 @@
/* This function parses the use-service action ruleset. It executes
* the associated ACL and set an applet as a stream or txn final node.
* it returns ACT_RET_ERR if an error occurs, the proxy left in
- * consistent state. It returns ACT_RET_STOP in succes case because
+ * consistent state. It returns ACT_RET_STOP in success case because
* use-service must be a terminal action. Returns ACT_RET_YIELD
* if the initialisation function require more data.
*/
@@ -995,7 +995,7 @@
else
appctx = si_appctx(&s->si[1]);
- /* Stops the applet sheduling, in case of the init function miss
+ /* Stops the applet scheduling, in case of the init function miss
* some data.
*/
si_stop_get(&s->si[1]);
diff --git a/src/wurfl.c b/src/wurfl.c
index b8133ba..b7eb1fe 100644
--- a/src/wurfl.c
+++ b/src/wurfl.c
@@ -294,7 +294,7 @@
// ebtree initialization
global_wurfl.btree = EB_ROOT;
- // checking if informations are valid WURFL data ( cap, vcaps, properties )
+ // checking if information is valid WURFL data ( cap, vcaps, properties )
list_for_each_entry(wi, &global_wurfl.information_list, list) {
// check if information is already loaded looking into btree
if (ebst_lookup(&global_wurfl.btree, wi->data.name) == NULL) {
@@ -736,7 +736,7 @@
//the header is searched from the beginning
ctx.blk = NULL;
- // We could skip this chek since ha_wurfl_retrieve_header is called from inside
+ // We could skip this check since ha_wurfl_retrieve_header is called from inside
// ha_wurfl_get()/ha_wurfl_get_all() that already perform the same check
// We choose to keep it in case ha_wurfl_retrieve_header will be called directly
htx = smp_prefetch_htx(smp, chn, NULL, 1);