Hello,

I can send typo fixes weekly.

Cheers,
Ilya Shipitcin
From 6f06c0fdd87ac14e8e553ac823646d2504944f25 Mon Sep 17 00:00:00 2001
From: Ilya Shipitsin <chipits...@gmail.com>
Date: Mon, 23 Mar 2020 22:28:40 +0500
Subject: [PATCH] CLEANUP: assorted typo fixes in the code and comments

This is fifth iteration of typo fixes
---
 contrib/deviceatlas/dac.h                     |  2 +-
 contrib/mod_defender/spoa.c                   |  2 +-
 contrib/modsecurity/modsec_wrapper.c          |  4 ++--
 contrib/modsecurity/spoa.c                    |  2 +-
 contrib/plug_qdisc/plug_qdisc.c               |  2 +-
 .../prometheus-exporter/service-prometheus.c  | 20 +++++++++----------
 contrib/spoa_example/include/spoe_types.h     |  2 +-
 contrib/spoa_example/spoa.c                   |  2 +-
 contrib/spoa_server/ps_lua.c                  |  4 ++--
 contrib/spoa_server/ps_python.c               |  4 ++--
 contrib/spoa_server/spoa.c                    | 10 +++++-----
 .../wireshark-dissectors/peers/packet-happp.c |  2 +-
 contrib/wurfl/wurfl/wurfl.h                   |  2 +-
 src/connection.c                              |  4 ++--
 src/ev_evports.c                              |  2 +-
 src/hlua_fcn.c                                | 10 +++++-----
 src/raw_sock.c                                |  2 +-
 17 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/contrib/deviceatlas/dac.h b/contrib/deviceatlas/dac.h
index 4e0189a71..92a9396c0 100644
--- a/contrib/deviceatlas/dac.h
+++ b/contrib/deviceatlas/dac.h
@@ -70,7 +70,7 @@ enum da_status {
 enum da_severity {
     DA_SEV_FATAL, /* The operation will not continue, and the operation will return an error. */
     DA_SEV_ERROR, /* An error occurred, but the API call will return at least some valid information */
-    DA_SEV_WARN,  /* An unexpected event occured, but the system dealt with it */
+    DA_SEV_WARN,  /* An unexpected event occurred, but the system dealt with it */
     DA_SEV_INFO   /* An informational message. */
 };
 /* Forward references to tagged types */
diff --git a/contrib/mod_defender/spoa.c b/contrib/mod_defender/spoa.c
index 94e6d6bda..079e880cb 100644
--- a/contrib/mod_defender/spoa.c
+++ b/contrib/mod_defender/spoa.c
@@ -192,7 +192,7 @@ check_proto_version(struct spoe_frame *frame, char **buf, char *end)
 	DEBUG(frame->worker, "<%lu> Supported versions : %.*s",
 	      frame->client->id, (int)sz, str);
 
-	/* TODO: Find the right verion in supported ones */
+	/* TODO: Find the right version in supported ones */
 
 	ret  = (p - *buf);
 	*buf = p;
diff --git a/contrib/modsecurity/modsec_wrapper.c b/contrib/modsecurity/modsec_wrapper.c
index a3a25414f..7ae831e5c 100644
--- a/contrib/modsecurity/modsec_wrapper.c
+++ b/contrib/modsecurity/modsec_wrapper.c
@@ -140,7 +140,7 @@ int modsecurity_load(const char *file)
 
 	modsec_server = modsecInit();
 	if (modsec_server == NULL) {
-		LOG(&null_worker, "ModSecurity initilisation failed.\n");
+		LOG(&null_worker, "ModSecurity initialisation failed.\n");
 		return -1;
 	}
 
@@ -153,7 +153,7 @@ int modsecurity_load(const char *file)
 
 	modsec_config = modsecGetDefaultConfig();
 	if (modsec_config == NULL) {
-		LOG(&null_worker, "ModSecurity default configuration initilisation failed.\n");
+		LOG(&null_worker, "ModSecurity default configuration initialisation failed.\n");
 		return -1;
 	}
 
diff --git a/contrib/modsecurity/spoa.c b/contrib/modsecurity/spoa.c
index 225db29f8..20916fdf3 100644
--- a/contrib/modsecurity/spoa.c
+++ b/contrib/modsecurity/spoa.c
@@ -197,7 +197,7 @@ check_proto_version(struct spoe_frame *frame, char **buf, char *end)
 	DEBUG(frame->worker, "<%lu> Supported versions : %.*s",
 	      frame->client->id, (int)sz, str);
 
-	/* TODO: Find the right verion in supported ones */
+	/* TODO: Find the right version in supported ones */
 
 	ret  = (p - *buf);
 	*buf = p;
diff --git a/contrib/plug_qdisc/plug_qdisc.c b/contrib/plug_qdisc/plug_qdisc.c
index 606a834c3..bc47f5d1e 100644
--- a/contrib/plug_qdisc/plug_qdisc.c
+++ b/contrib/plug_qdisc/plug_qdisc.c
@@ -10,7 +10,7 @@
  * XXX Please, first note that this code is not safe. XXX
  * It was developed fast so that to reproduce a bug.
  * You will certainly have to adapt it to your application.
- * But at least it gives an idea about how to programatically use plug
+ * But at least it gives an idea about how to programmatically use plug
  * queueing disciplines.
  */
 
diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c
index 6e7eca04b..8ffeb8203 100644
--- a/contrib/prometheus-exporter/service-prometheus.c
+++ b/contrib/prometheus-exporter/service-prometheus.c
@@ -73,7 +73,7 @@ enum {
 #define PROMEX_FL_SCOPE_ALL (PROMEX_FL_SCOPE_GLOBAL|PROMEX_FL_SCOPE_FRONT|PROMEX_FL_SCOPE_BACK|PROMEX_FL_SCOPE_SERVER)
 
 /* The max length for metrics name. It is a hard limit but it should be
- * enougth.
+ * enough.
  */
 #define PROMEX_MAX_NAME_LEN 128
 
@@ -615,7 +615,7 @@ const struct ist promex_st_metric_names[ST_F_TOTAL_FIELDS] = {
 const struct ist promex_inf_metric_desc[INF_TOTAL_FIELDS] = {
 	[INF_NAME]                           = IST("Product name."),
 	[INF_VERSION]                        = IST("HAProxy version."),
-	[INF_RELEASE_DATE]                   = IST("HAProxy realease date."),
+	[INF_RELEASE_DATE]                   = IST("HAProxy release date."),
 	[INF_NBTHREAD]                       = IST("Configured number of threads."),
 	[INF_NBPROC]                         = IST("Configured number of processes."),
 	[INF_PROCESS_NUM]                    = IST("Relative process id, starting at 1."),
@@ -627,7 +627,7 @@ const struct ist promex_inf_metric_desc[INF_TOTAL_FIELDS] = {
 	[INF_POOL_USED_MB]                   = IST("Total amount of memory used in pools (in bytes)."),
 	[INF_POOL_FAILED]                    = IST("Total number of failed pool allocations."),
 	[INF_ULIMIT_N]                       = IST("Maximum number of open file descriptors; 0=unset."),
-	[INF_MAXSOCK]                        = IST("Maximum numer of open sockets."),
+	[INF_MAXSOCK]                        = IST("Maximum number of open sockets."),
 	[INF_MAXCONN]                        = IST("Maximum number of concurrent connections."),
 	[INF_HARD_MAXCONN]                   = IST("Initial Maximum number of concurrent connections."),
 	[INF_CURR_CONN]                      = IST("Number of active sessions."),
@@ -1140,7 +1140,7 @@ static int promex_metric_to_str(struct buffer *out, struct field *f, size_t max)
 /* Concatenate the <prefix> with the field name using the array
  * <promex_st_metric_names> and store it in <name>. The field type is in
  * <appctx->st2>. This function never fails but relies on
- * <PROMEX_MAX_NAME_LEN>. So by sure the result is small enougth to be copied in
+ * <PROMEX_MAX_NAME_LEN>. So by sure the result is small enough to be copied in
  * <name>
  */
 static void promex_metric_name(struct appctx *appctx, struct ist *name, const struct ist prefix)
@@ -1252,7 +1252,7 @@ static int promex_dump_metric(struct appctx *appctx, struct htx *htx,
 }
 
 
-/* Dump global metrics (prefixed by "haproxy_process_"). It returns 1 on sucess,
+/* Dump global metrics (prefixed by "haproxy_process_"). It returns 1 on success,
  * 0 if <htx> is full and -1 in case of any error. */
 static int promex_dump_global_metrics(struct appctx *appctx, struct htx *htx)
 {
@@ -1465,7 +1465,7 @@ static int promex_dump_global_metrics(struct appctx *appctx, struct htx *htx)
 	goto end;
 }
 
-/* Dump frontends metrics (prefixed by "haproxy_frontend_"). It returns 1 on sucess,
+/* Dump frontends metrics (prefixed by "haproxy_frontend_"). It returns 1 on success,
  * 0 if <htx> is full and -1 in case of any error. */
 static int promex_dump_front_metrics(struct appctx *appctx, struct htx *htx)
 {
@@ -1648,7 +1648,7 @@ static int promex_dump_front_metrics(struct appctx *appctx, struct htx *htx)
 	goto end;
 }
 
-/* Dump backends metrics (prefixed by "haproxy_backend_"). It returns 1 on sucess,
+/* Dump backends metrics (prefixed by "haproxy_backend_"). It returns 1 on success,
  * 0 if <htx> is full and -1 in case of any error. */
 static int promex_dump_back_metrics(struct appctx *appctx, struct htx *htx)
 {
@@ -1892,7 +1892,7 @@ static int promex_dump_back_metrics(struct appctx *appctx, struct htx *htx)
 	goto end;
 }
 
-/* Dump servers metrics (prefixed by "haproxy_server_"). It returns 1 on sucess,
+/* Dump servers metrics (prefixed by "haproxy_server_"). It returns 1 on success,
  * 0 if <htx> is full and -1 in case of any error. */
 static int promex_dump_srv_metrics(struct appctx *appctx, struct htx *htx)
 {
@@ -2243,7 +2243,7 @@ static int promex_dump_metrics(struct appctx *appctx, struct stream_interface *s
 	return -1;
 }
 
-/* Parse the query stirng of request URI to filter the metrics. It returns 1 on
+/* Parse the query string of request URI to filter the metrics. It returns 1 on
  * success and -1 on error. */
 static int promex_parse_uri(struct appctx *appctx, struct stream_interface *si)
 {
@@ -2401,7 +2401,7 @@ static void promex_appctx_handle_io(struct appctx *appctx)
 	if (unlikely(si->state == SI_ST_DIS || si->state == SI_ST_CLO))
 		goto out;
 
-	/* Check if the input buffer is avalaible. */
+	/* Check if the input buffer is available. */
 	if (!b_size(&res->buf)) {
 		si_rx_room_blk(si);
 		goto out;
diff --git a/contrib/spoa_example/include/spoe_types.h b/contrib/spoa_example/include/spoe_types.h
index 8f93edd21..a986227cb 100644
--- a/contrib/spoa_example/include/spoe_types.h
+++ b/contrib/spoa_example/include/spoe_types.h
@@ -100,7 +100,7 @@ enum spoe_context_error {
 	SPOE_CTX_ERRS,
 };
 
-/* Errors triggerd by SPOE applet */
+/* Errors triggered by SPOE applet */
 enum spoe_frame_error {
 	SPOE_FRM_ERR_NONE = 0,
 	SPOE_FRM_ERR_IO,
diff --git a/contrib/spoa_example/spoa.c b/contrib/spoa_example/spoa.c
index f32ac449a..dd4a87338 100644
--- a/contrib/spoa_example/spoa.c
+++ b/contrib/spoa_example/spoa.c
@@ -246,7 +246,7 @@ check_proto_version(struct spoe_frame *frame, char **buf, char *end)
 	DEBUG(frame->worker, "<%lu> Supported versions : %.*s",
 	      frame->client->id, (int)sz, str);
 
-	/* TODO: Find the right verion in supported ones */
+	/* TODO: Find the right version in supported ones */
 
 	ret  = (p - *buf);
 	*buf = p;
diff --git a/contrib/spoa_server/ps_lua.c b/contrib/spoa_server/ps_lua.c
index e7de2d93a..2d37d9b1e 100644
--- a/contrib/spoa_server/ps_lua.c
+++ b/contrib/spoa_server/ps_lua.c
@@ -396,7 +396,7 @@ static int ps_lua_load_file(struct worker *w, const char *file)
 		lua_pop(L, 1);
 		return 0;
 	default:
-		fprintf(stderr, "lua unknonwn error: %s\n", lua_tostring(L, 0));
+		fprintf(stderr, "lua unknown error: %s\n", lua_tostring(L, 0));
 		lua_pop(L, 1);
 		return 0;
 	}
@@ -488,7 +488,7 @@ static int ps_lua_exec_message(struct worker *w, void *ref, int nargs, struct sp
 		case LUA_ERRERR:
 			msg_fmt = msg_fmt ? msg_fmt : "Lua message handler error";
 		default:
-			msg_fmt = msg_fmt ? msg_fmt : "Lua unknonwn error";
+			msg_fmt = msg_fmt ? msg_fmt : "Lua unknown error";
 			msg = lua_tostring(L, -1);
 			if (msg == NULL)
 				msg = "Unknown error";
diff --git a/contrib/spoa_server/ps_python.c b/contrib/spoa_server/ps_python.c
index 0a9fbffc6..2dbe5ee38 100644
--- a/contrib/spoa_server/ps_python.c
+++ b/contrib/spoa_server/ps_python.c
@@ -50,7 +50,7 @@ static PyObject *ps_python_register_message(PyObject *self, PyObject *args)
 
 	if (!PyArg_ParseTuple(args, "sO!", &name, &PyFunction_Type, &ref))
 		return NULL;
-	Py_XINCREF(ref); /* because the function is intenally refrenced */
+	Py_XINCREF(ref); /* because the function is internally referenced */
 
 	ps_register_message(&ps_python_bindings, name, (void *)ref);
 
@@ -602,7 +602,7 @@ static int ps_python_exec_message(struct worker *w, void *ref, int nargs, struct
 		}
 	}
 
-	/* Dictionnary { args = <list-of-args> } for the function */
+	/* Dictionary { args = <list-of-args> } for the function */
 
 	fkw = PyDict_New();
 	if (fkw == NULL) {
diff --git a/contrib/spoa_server/spoa.c b/contrib/spoa_server/spoa.c
index f36c3db90..9a8ffd0a0 100644
--- a/contrib/spoa_server/spoa.c
+++ b/contrib/spoa_server/spoa.c
@@ -51,7 +51,7 @@ enum spoe_frame_type {
 	SPOE_FRM_T_AGENT_ACK
 };
 
-/* Errors triggerd by SPOE applet */
+/* Errors triggered by SPOE applet */
 enum spoe_frame_error {
 	SPOE_FRM_ERR_NONE = 0,
 	SPOE_FRM_ERR_IO,
@@ -501,7 +501,7 @@ check_proto_version(struct worker *w, int idx)
 		return -1;
 	}
 
-	/* TODO: Find the right verion in supported ones */
+	/* TODO: Find the right version in supported ones */
 
 	return idx;
 }
@@ -822,7 +822,7 @@ int set_var_bin(struct worker *w,
 }
 
 /* This function is a little bit ugly,
- * TODO: improve the response without copying the bufer
+ * TODO: improve the response without copying the buffer
  */
 static int commit_agentack(struct worker *w)
 {
@@ -872,7 +872,7 @@ handle_hanotify(struct worker *w)
 	DEBUG("Notify frame received: stream-id=%u - frame-id=%u",
 	      w->stream_id, w->frame_id);
 
-	/* Prepara ack, if the processing fails tha ack will be cancelled */
+	/* Prepare ack, if the processing fails the ack will be cancelled */
 	prepare_agentack(w);
 
 	/* Loop on messages */
@@ -915,7 +915,7 @@ handle_hanotify(struct worker *w)
 			idx += i;
 		}
 
-		/* Lookup for existsing bindings. If no existing message
+		/* Lookup for existing bindings. If no existing message
 		 * where found, does nothing.
 		 */
 		for (msg = ps_messages; msg; msg = msg->next)
diff --git a/contrib/wireshark-dissectors/peers/packet-happp.c b/contrib/wireshark-dissectors/peers/packet-happp.c
index 980e290c2..33263b418 100644
--- a/contrib/wireshark-dissectors/peers/packet-happp.c
+++ b/contrib/wireshark-dissectors/peers/packet-happp.c
@@ -158,7 +158,7 @@ enum {
 };
 
 /* The types of data we can store in a stick table.
- * Same defintions as in HAProxy sources.
+ * Same definitions as in HAProxy sources.
  */
 enum {
 	STKT_DT_SERVER_ID,      /* the server ID to use with this stream if > 0 */
diff --git a/contrib/wurfl/wurfl/wurfl.h b/contrib/wurfl/wurfl/wurfl.h
index ca512daeb..3b450fc03 100644
--- a/contrib/wurfl/wurfl/wurfl.h
+++ b/contrib/wurfl/wurfl/wurfl.h
@@ -322,7 +322,7 @@ wurfl_error wurfl_updater_set_data_url(wurfl_handle hwurfl, const char *data_url
 wurfl_error wurfl_updater_set_data_frequency(wurfl_handle hwurfl, wurfl_updater_frequency freq);
 
 // Set updater timeouts.
-// There are two timeouts, both in miliseconds : connection timeout and operation timeout.
+// There are two timeouts, both in milliseconds : connection timeout and operation timeout.
 // The values are mapped to CURL --connect-timeout and --max-time parameters
 // (after millisecs-to-secs conversion). Note that CURL sub millisecond timeouts don't work for
 // lack of a way to specify decimal values for timeout to curl (using 0.05 for example fails to work
diff --git a/src/connection.c b/src/connection.c
index 45d81d8ba..5a2fd95bc 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -140,7 +140,7 @@ void conn_fd_handler(int fd)
 
  leave:
 	/* If we don't yet have a mux, that means we were waiting for
-	 * informations to create one, typically from the ALPN. If we're
+	 * information to create one, typically from the ALPN. If we're
 	 * done with the handshake, attempt to create one.
 	 */
 	if (unlikely(!conn->mux) && !(conn->flags & CO_FL_WAIT_XPRT))
@@ -1193,7 +1193,7 @@ int conn_recv_socks4_proxy_response(struct connection *conn)
 	 *	code with one of the following values:
 	 *	90: request granted
 	 *	91: request rejected or failed
-	 *	92: request rejected becasue SOCKS server cannot connect to identd on the client
+	 *	92: request rejected because SOCKS server cannot connect to identd on the client
 	 *	93: request rejected because the client program and identd report different user-ids
 	 *	The remaining fields are ignored.
 	 */
diff --git a/src/ev_evports.c b/src/ev_evports.c
index 23591d229..3d0dd435b 100644
--- a/src/ev_evports.c
+++ b/src/ev_evports.c
@@ -249,7 +249,7 @@ static void _do_poll(struct poller *p, int exp, int wake)
 		/*
 		 * Call connection processing callbacks.  Note that it's
 		 * possible for this processing to alter the required event
-		 * port assocation; i.e., the "state" member of the "fdtab"
+		 * port association; i.e., the "state" member of the "fdtab"
 		 * entry.  If it changes, the fd will be placed on the updated
 		 * list for processing the next time we are called.
 		 */
diff --git a/src/hlua_fcn.c b/src/hlua_fcn.c
index 29c0bf407..a9c7fe507 100644
--- a/src/hlua_fcn.c
+++ b/src/hlua_fcn.c
@@ -123,7 +123,7 @@ int hlua_fcn_pushfield(lua_State *L, struct field *field)
 		/* 64 bits case, S64 is always supported */
 		lua_pushinteger(L, field->u.s64);
 #else
-		/* 64 bits case, S64 is supported beetween INT_MIN and INT_MAX */
+		/* 64 bits case, S64 is supported between INT_MIN and INT_MAX */
 		if (field->u.s64 < INT_MIN || field->u.s64 > INT_MAX)
 			lua_pushnumber(L, (lua_Number)field->u.s64);
 		else
@@ -214,7 +214,7 @@ int hlua_dump_object(struct lua_State *L)
 
 /* This function register a table as metatable and. It names
  * the metatable, and returns the associated reference.
- * The original table is poped from the top of the stack.
+ * The original table is popped from the top of the stack.
  * "name" is the referenced class name.
  */
 int hlua_register_metatable(struct lua_State *L, char *name)
@@ -235,7 +235,7 @@ int hlua_register_metatable(struct lua_State *L, char *name)
 	lua_rawset(L, -3);
 
 	/* Register a named entry for the table. The table
-	 * reference is copyed first because the function
+	 * reference is copied first because the function
 	 * lua_setfield() pop the entry.
 	 */
 	lua_pushvalue(L, -1);
@@ -424,7 +424,7 @@ static int hlua_concat_dump(lua_State *L)
 	buffer = lua_touserdata(L, -1);
 	lua_pop(L, 1);
 
-	/* Push the soncatenated strng in the stack. */
+	/* Push the soncatenated string in the stack. */
 	lua_pushlstring(L, buffer, b->len);
 	return 1;
 }
@@ -1421,7 +1421,7 @@ int hlua_fcn_post_init(lua_State *L)
  * It tokenize the input string using the list of separators
  * as separator.
  *
- * The functionreturns a tablle filled with tokens.
+ * The functionreturns a table filled with tokens.
  */
 int hlua_tokenize(lua_State *L)
 {
diff --git a/src/raw_sock.c b/src/raw_sock.c
index f17d45d78..340f92993 100644
--- a/src/raw_sock.c
+++ b/src/raw_sock.c
@@ -113,7 +113,7 @@ int raw_sock_to_pipe(struct connection *conn, void *xprt_ctx, struct pipe *pipe,
 				 * empty the pipe.
 				 */
 				if (pipe->data) {
-					/* alway stop reading until the pipe is flushed */
+					/* always stop reading until the pipe is flushed */
 					conn->flags |= CO_FL_WAIT_ROOM;
 					break;
 				}
-- 
2.25.1

Reply via email to