CLEANUP: assorted typo fixes in the code and comments
This is 22nd iteration of typo fixes
diff --git a/src/action.c b/src/action.c
index 5e430f2..98359ba 100644
--- a/src/action.c
+++ b/src/action.c
@@ -25,7 +25,7 @@
/* Check an action ruleset validity. It returns the number of error encountered
- * andd err_code is updated if a warning is emitted.
+ * and err_code is updated if a warning is emitted.
*/
int check_action_rules(struct list *rules, struct proxy *px, int *err_code)
{
diff --git a/src/cfgdiag.c b/src/cfgdiag.c
index a06ae0f..f8e4a9e 100644
--- a/src/cfgdiag.c
+++ b/src/cfgdiag.c
@@ -8,7 +8,7 @@
#include <haproxy/proxy.h>
#include <haproxy/server.h>
-/* Use this fonction to emit diagnostic.
+/* Use this function to emit diagnostic.
* This can be used as a shortcut to set value pointed by <ret> to 1 at the
* same time.
*/
diff --git a/src/check.c b/src/check.c
index ee225a2..026f1c5 100644
--- a/src/check.c
+++ b/src/check.c
@@ -1201,7 +1201,7 @@
}
else if (check->result == CHK_RES_CONDPASS) {
/* check is OK but asks for stopping mode */
- TRACE_DEVEL("report conditionnal success", CHK_EV_TASK_WAKE|CHK_EV_HCHK_END|CHK_EV_HCHK_SUCC, check);
+ TRACE_DEVEL("report conditional success", CHK_EV_TASK_WAKE|CHK_EV_HCHK_END|CHK_EV_HCHK_SUCC, check);
check_notify_stopping(check);
}
else if (check->result == CHK_RES_PASSED) {
diff --git a/src/fd.c b/src/fd.c
index f4a28cd..3387653 100644
--- a/src/fd.c
+++ b/src/fd.c
@@ -337,7 +337,7 @@
void fd_delete(int fd)
{
/* we must postpone removal of an FD that may currently be in use
- * by another thread. This can happend in the following two situations:
+ * by another thread. This can happen in the following two situations:
* - after a takeover, the owning thread closes the connection but
* the previous one just woke up from the poller and entered
* the FD handler iocb. That thread holds an entry in running_mask
diff --git a/src/http_act.c b/src/http_act.c
index 58e1bb8..eb70d7a 100644
--- a/src/http_act.c
+++ b/src/http_act.c
@@ -2335,8 +2335,8 @@
* function. it returns ACT_RET_CONT when conditions are met to stop to wait.
* Otherwise ACT_RET_YIELD is returned to wait for more data. ACT_RET_INV is
* returned if a parsing error is raised by lower level and ACT_RET_ERR if an
- * internal error occured. Finally ACT_RET_ABRT is returned when a timeout
- * occured.
+ * internal error occurred. Finally ACT_RET_ABRT is returned when a timeout
+ * occurred.
*/
static enum act_return http_action_wait_for_body(struct act_rule *rule, struct proxy *px,
struct session *sess, struct stream *s, int flags)
diff --git a/src/http_ana.c b/src/http_ana.c
index 0a32107..77d6d1b 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -4107,11 +4107,11 @@
*
* - HTTP_RULE_RES_CONT when conditions are met to stop waiting
* - HTTP_RULE_RES_YIELD to wait for more data
- * - HTTP_RULE_RES_ABRT when a timeout occured.
+ * - HTTP_RULE_RES_ABRT when a timeout occurred.
* - HTTP_RULE_RES_BADREQ if a parsing error is raised by lower level
- * - HTTP_RULE_RES_ERROR if an internal error occured
+ * - HTTP_RULE_RES_ERROR if an internal error occurred
*
- * If a timeout occured, this function is responsible to emit the right response
+ * If a timeout occurred, this function is responsible to emit the right response
* to the client, depending on the channel (408 on request side, 504 on response
* side). All other errors must be handled by the caller.
*/
diff --git a/src/sink.c b/src/sink.c
index 63d3778..5605c2b 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -930,7 +930,7 @@
* it returns NULL.
*
* Note: the sink is created using the name
- * specified inot logsrv->ring_name
+ * specified into logsrv->ring_name
*/
struct sink *sink_new_from_logsrv(struct logsrv *logsrv)
{
@@ -998,7 +998,7 @@
sft->ofs = ~0;
HA_SPIN_INIT(&sft->lock);
- /* prepare descrition for sink */
+ /* prepare description for the sink */
chunk_reset(&trash);
chunk_printf(&trash, "created from logserver declared into '%s' at line %d", logsrv->conf.file, logsrv->conf.line);
diff --git a/src/slz.c b/src/slz.c
index db261f8..a9104ea 100644
--- a/src/slz.c
+++ b/src/slz.c
@@ -308,7 +308,7 @@
enqueue8(strm, 0, 7); // direct encoding of 256 = EOB (cf RFC1951)
}
-/* copies <len> litterals from <buf>. <more> indicates that there are data past
+/* copies <len> literals from <buf>. <more> indicates that there are data past
* buf + <len>. <len> must not be null.
*/
static void copy_lit(struct slz_stream *strm, const void *buf, uint32_t len, int more)
@@ -337,7 +337,7 @@
} while (len);
}
-/* copies <len> litterals from <buf>. <more> indicates that there are data past
+/* copies <len> literals from <buf>. <more> indicates that there are data past
* buf + <len>. <len> must not be null.
*/
static void copy_lit_huff(struct slz_stream *strm, const unsigned char *buf, uint32_t len, int more)
@@ -1029,7 +1029,7 @@
* returns the number of bytes emitted. The trailer consists in flushing the
* possibly pending bits from the queue (up to 24 bits), rounding to the next
* byte, then 4 bytes for the CRC and another 4 bytes for the input length.
- * That may abount to 4+4+4 = 12 bytes, that the caller must ensure are
+ * That may about to 4+4+4 = 12 bytes, that the caller must ensure are
* available before calling the function. Note that if the initial header was
* never sent, it will be sent first as well (10 extra bytes).
*/
@@ -1283,7 +1283,7 @@
* buffer <buf>. When it's done, the stream state is updated to SLZ_ST_END. It
* returns the number of bytes emitted. The trailer consists in flushing the
* possibly pending bits from the queue (up to 24 bits), rounding to the next
- * byte, then 4 bytes for the CRC. That may abount to 4+4 = 8 bytes, that the
+ * byte, then 4 bytes for the CRC. That may about to 4+4 = 8 bytes, that the
* caller must ensure are available before calling the function. Note that if
* the initial header was never sent, it will be sent first as well (2 extra
* bytes).
diff --git a/src/tcpcheck.c b/src/tcpcheck.c
index bc6eb3c..d1f9a15 100644
--- a/src/tcpcheck.c
+++ b/src/tcpcheck.c
@@ -925,7 +925,7 @@
if (ps) {
const char *msg;
- TRACE_DEVEL("change server weigth", CHK_EV_TCPCHK_EXP, check);
+ TRACE_DEVEL("change server weight", CHK_EV_TCPCHK_EXP, check);
msg = server_parse_weight_change_request(check->server, ps);
if (!wrn || !*wrn)
wrn = msg;
@@ -1261,7 +1261,7 @@
out:
if (conn && check->result == CHK_RES_FAILED) {
conn->flags |= CO_FL_ERROR;
- TRACE_ERROR("connect failed, report conncetion error", CHK_EV_TCPCHK_CONN|CHK_EV_TCPCHK_ERR, check);
+ TRACE_ERROR("connect failed, report connection error", CHK_EV_TCPCHK_CONN|CHK_EV_TCPCHK_ERR, check);
}
if (ret == TCPCHK_EVAL_CONTINUE && check->proxy->timeout.check)