CLEANUP: assorted typo fixes in the code and comments

This is fifth iteration of typo fixes
This commit is contained in:
Ilya Shipitsin 2020-03-23 22:28:40 +05:00 committed by Willy Tarreau
parent 1d52c7b52b
commit ce7b00f926
17 changed files with 38 additions and 38 deletions

View File

@ -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 */

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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.
*/

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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";

View File

@ -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) {

View File

@ -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)

View File

@ -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 */

View File

@ -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

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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)
{

View File

@ -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;
}