From d425950c68a647f9bdabd0ada171fa95b974b384 Mon Sep 17 00:00:00 2001 From: Ilya Shipitsin Date: Wed, 8 Apr 2020 01:07:56 +0500 Subject: [PATCH] CLEANUP: assorted typo fixes in the code and comments This is 7th iteration of typo fixes --- ebtree/ebistree.c | 2 +- ebtree/ebistree.h | 4 ++-- ebtree/ebsttree.c | 2 +- ebtree/ebsttree.h | 4 ++-- include/types/acl.h | 2 +- include/types/applet.h | 4 ++-- include/types/compression.h | 2 +- include/types/dns.h | 4 ++-- include/types/hlua.h | 2 +- include/types/map.h | 2 +- include/types/server.h | 4 ++-- include/types/spoe.h | 8 ++++---- src/checks.c | 2 +- src/cli.c | 6 +++--- src/hlua.c | 32 ++++++++++++++++---------------- src/http_htx.c | 4 ++-- src/stick_table.c | 2 +- tests/test-acl-args.cfg | 2 +- tests/test-sample-fetch-args.cfg | 2 +- 19 files changed, 45 insertions(+), 45 deletions(-) diff --git a/ebtree/ebistree.c b/ebtree/ebistree.c index 098ccfb43..6ad5e95f4 100644 --- a/ebtree/ebistree.c +++ b/ebtree/ebistree.c @@ -23,7 +23,7 @@ #include "ebistree.h" /* Find the first occurrence of a zero-terminated string in the tree . - * It's the caller's reponsibility to use this function only on trees which + * It's the caller's responsibility to use this function only on trees which * only contain zero-terminated strings. If none can be found, return NULL. */ struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x) diff --git a/ebtree/ebistree.h b/ebtree/ebistree.h index 0c995483f..a438fa147 100644 --- a/ebtree/ebistree.h +++ b/ebtree/ebistree.h @@ -39,7 +39,7 @@ struct ebpt_node *ebis_lookup(struct eb_root *root, const char *x); struct ebpt_node *ebis_insert(struct eb_root *root, struct ebpt_node *new); /* Find the first occurrence of a length string in the tree . - * It's the caller's reponsibility to use this function only on trees which + * It's the caller's responsibility to use this function only on trees which * only contain zero-terminated strings, and that no null character is present * in string in the first chars. If none can be found, return NULL. */ @@ -55,7 +55,7 @@ ebis_lookup_len(struct eb_root *root, const char *x, unsigned int len) } /* Find the first occurrence of a zero-terminated string in the tree . - * It's the caller's reponsibility to use this function only on trees which + * It's the caller's responsibility to use this function only on trees which * only contain zero-terminated strings. If none can be found, return NULL. */ static forceinline struct ebpt_node *__ebis_lookup(struct eb_root *root, const void *x) diff --git a/ebtree/ebsttree.c b/ebtree/ebsttree.c index e44796ca6..12469cc1f 100644 --- a/ebtree/ebsttree.c +++ b/ebtree/ebsttree.c @@ -23,7 +23,7 @@ #include "ebsttree.h" /* Find the first occurrence of a zero-terminated string in the tree . - * It's the caller's reponsibility to use this function only on trees which + * It's the caller's responsibility to use this function only on trees which * only contain zero-terminated strings. If none can be found, return NULL. */ struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x) diff --git a/ebtree/ebsttree.h b/ebtree/ebsttree.h index d1949c788..db2267bf1 100644 --- a/ebtree/ebsttree.h +++ b/ebtree/ebsttree.h @@ -33,7 +33,7 @@ struct ebmb_node *ebst_lookup(struct eb_root *root, const char *x); struct ebmb_node *ebst_insert(struct eb_root *root, struct ebmb_node *new); /* Find the first occurrence of a length string in the tree . - * It's the caller's reponsibility to use this function only on trees which + * It's the caller's responsibility to use this function only on trees which * only contain zero-terminated strings, and that no null character is present * in string in the first chars. If none can be found, return NULL. */ @@ -49,7 +49,7 @@ ebst_lookup_len(struct eb_root *root, const char *x, unsigned int len) } /* Find the first occurrence of a zero-terminated string in the tree . - * It's the caller's reponsibility to use this function only on trees which + * It's the caller's responsibility to use this function only on trees which * only contain zero-terminated strings. If none can be found, return NULL. */ static forceinline struct ebmb_node *__ebst_lookup(struct eb_root *root, const void *x) diff --git a/include/types/acl.h b/include/types/acl.h index 3d4428434..04318ea04 100644 --- a/include/types/acl.h +++ b/include/types/acl.h @@ -42,7 +42,7 @@ * - FAIL : no mattern may ever match * * We assign values 0, 1 and 3 to FAIL, MISS and PASS respectively, so that we - * can make use of standard arithmetics for the truth tables below : + * can make use of standard arithmetic for the truth tables below : * * x | !x x&y | F(0) | M(1) | P(3) x|y | F(0) | M(1) | P(3) * ------+----- -----+------+------+----- -----+------+------+----- diff --git a/include/types/applet.h b/include/types/applet.h index 0f10e26df..b990726f7 100644 --- a/include/types/applet.h +++ b/include/types/applet.h @@ -39,7 +39,7 @@ struct applet { enum obj_type obj_type; /* object type = OBJ_TYPE_APPLET */ /* 3 unused bytes here */ char *name; /* applet's name to report in logs */ - int (*init)(struct appctx *, struct proxy *px, struct stream *strm); /* callback to init ressources, may be NULL. + int (*init)(struct appctx *, struct proxy *px, struct stream *strm); /* callback to init resources, may be NULL. expect 1 if ok, 0 if an error occurs, -1 if miss data. */ void (*fct)(struct appctx *); /* internal I/O handler, may never be NULL */ void (*release)(struct appctx *); /* callback to release resources, may be NULL */ @@ -114,7 +114,7 @@ struct appctx { struct cache_entry *entry; /* Entry to be sent from cache. */ unsigned int sent; /* The number of bytes already sent for this cache entry. */ unsigned int offset; /* start offset of remaining data relative to beginning of the next block */ - unsigned int rem_data; /* Remaing bytes for the last data block (HTX only, 0 means process next block) */ + unsigned int rem_data; /* Remaining bytes for the last data block (HTX only, 0 means process next block) */ struct shared_block *next; /* The next block of data to be sent for this cache entry. */ } cache; /* all entries below are used by various CLI commands, please diff --git a/include/types/compression.h b/include/types/compression.h index e515aadf2..fc2ad2668 100644 --- a/include/types/compression.h +++ b/include/types/compression.h @@ -57,7 +57,7 @@ struct comp_ctx { int cur_lvl; }; -/* Thanks to MSIE/IIS, the "deflate" name is ambigous, as according to the RFC +/* Thanks to MSIE/IIS, the "deflate" name is ambiguous, as according to the RFC * it's a zlib-wrapped deflate stream, but MSIE only understands a raw deflate * stream. For this reason some people prefer to emit a raw deflate stream on * "deflate" and we'll need two algos for the same name, they are distinguished diff --git a/include/types/dns.h b/include/types/dns.h index 7e592b285..9926de0c7 100644 --- a/include/types/dns.h +++ b/include/types/dns.h @@ -46,7 +46,7 @@ extern struct pool_head *dns_requester_pool; #define DNS_MAX_NAME_SIZE 255 #define DNS_MAX_UDP_MESSAGE 8192 -/* DNS minimun record size: 1 char + 1 NULL + type + class */ +/* DNS minimum record size: 1 char + 1 NULL + type + class */ #define DNS_MIN_RECORD_SIZE (1 + 1 + 2 + 2) /* DNS smallest fqdn 'a.gl' size */ @@ -151,7 +151,7 @@ struct dns_answer_item { struct sockaddr address; /* IPv4 or IPv6, network format */ char target[DNS_MAX_NAME_SIZE+1]; /* Response data: SRV or CNAME type target */ time_t last_seen; /* When was the answer was last seen */ - struct dns_answer_item *ar_item; /* pointer to a RRset from the additionnal section, if exists */ + struct dns_answer_item *ar_item; /* pointer to a RRset from the additional section, if exists */ struct list list; }; diff --git a/include/types/hlua.h b/include/types/hlua.h index 414508650..28ed9bd49 100644 --- a/include/types/hlua.h +++ b/include/types/hlua.h @@ -124,7 +124,7 @@ struct hlua_appctx { struct hlua_txn htxn; }; -/* This struc is used with sample fetches and sample converters. */ +/* This struct is used with sample fetches and sample converters. */ struct hlua_smp { struct stream *s; struct proxy *p; diff --git a/include/types/map.h b/include/types/map.h index cea5aa55d..750da56da 100644 --- a/include/types/map.h +++ b/include/types/map.h @@ -28,7 +28,7 @@ struct map_descriptor { struct sample_conv *conv; /* original converter descriptor */ struct pattern_head pat; /* the pattern matching associated to the map */ - int do_free; /* set if is the orignal pat and must be freed */ + int do_free; /* set if is the original pat and must be freed */ }; #endif /* _TYPES_MAP_H */ diff --git a/include/types/server.h b/include/types/server.h index 1e5e031a7..48582e613 100644 --- a/include/types/server.h +++ b/include/types/server.h @@ -222,7 +222,7 @@ struct server { struct eb_root pendconns; /* pending connections */ struct list actconns; /* active connections */ - struct mt_list *idle_conns; /* sharable idle connections*/ + struct mt_list *idle_conns; /* shareable idle connections*/ struct mt_list *safe_conns; /* safe idle connections */ struct list *available_conns; /* Connection in used, but with still new streams available */ unsigned int pool_purge_delay; /* Delay before starting to purge the idle conns pool */ @@ -231,7 +231,7 @@ struct server { unsigned int curr_idle_nb; /* Current number of connections in the idle list */ unsigned int curr_safe_nb; /* Current number of connections in the safe list */ unsigned int curr_used_conns; /* Current number of used connections */ - unsigned int max_used_conns; /* Max number of used connections (the counter is resetted at each connection purges */ + unsigned int max_used_conns; /* Max number of used connections (the counter is reset at each connection purges */ unsigned int *curr_idle_thr; /* Current number of orphan idling connections per thread */ int max_reuse; /* Max number of requests on a same connection */ struct eb32_node idle_node; /* When to next do cleanup in the idle connections */ diff --git a/include/types/spoe.h b/include/types/spoe.h index 2dbf6e565..eaa0ef05c 100644 --- a/include/types/spoe.h +++ b/include/types/spoe.h @@ -132,7 +132,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, @@ -269,7 +269,7 @@ struct spoe_agent { struct freq_ctr processing_per_sec; struct freq_ctr conn_per_sec; /* connections per second */ - struct freq_ctr err_per_sec; /* connetion errors per second */ + struct freq_ctr err_per_sec; /* connection errors per second */ struct eb_root idle_applets; /* idle SPOE applets available to process data */ struct list applets; /* all SPOE applets for this agent */ @@ -307,7 +307,7 @@ struct spoe_context { struct list *groups; /* List of available SPOE group */ struct buffer buffer; /* Buffer used to store a encoded messages */ - struct buffer_wait buffer_wait; /* position in the list of ressources waiting for a buffer */ + struct buffer_wait buffer_wait; /* position in the list of resources waiting for a buffer */ struct list list; enum spoe_ctx_state state; /* SPOE_CTX_ST_* */ @@ -359,7 +359,7 @@ struct spoe_appctx { #endif struct buffer buffer; /* Buffer used to store a encoded messages */ - struct buffer_wait buffer_wait; /* position in the list of ressources waiting for a buffer */ + struct buffer_wait buffer_wait; /* position in the list of resources waiting for a buffer */ struct list waiting_queue; /* list of streams waiting for a ACK frame, in sync and pipelining mode */ struct list list; /* next spoe appctx for the same agent */ struct eb32_node node; /* node used for applets tree */ diff --git a/src/checks.c b/src/checks.c index ee2997aa5..e5b537500 100644 --- a/src/checks.c +++ b/src/checks.c @@ -3266,7 +3266,7 @@ const char *init_check(struct check *check, int type) check->wait_list.tasklet = tasklet_new(); if (!check->wait_list.tasklet) - return "out of memroy while allocating check tasklet"; + return "out of memory while allocating check tasklet"; check->wait_list.events = 0; check->wait_list.tasklet->process = event_srv_chk_io; check->wait_list.tasklet->context = check; diff --git a/src/cli.c b/src/cli.c index 25f72eae5..af1781104 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1770,11 +1770,11 @@ static int _getsocks(char **args, char *payload, struct appctx *appctx, void *pr * Listener options, as an int. */ /* We will send sockets MAX_SEND_FD per MAX_SEND_FD, allocate a - * buffer big enough to store the socket informations. + * buffer big enough to store the socket information. */ tmpbuf = malloc(MAX_SEND_FD * (1 + MAXPATHLEN + 1 + IFNAMSIZ + sizeof(int))); if (tmpbuf == NULL) { - ha_warning("Failed to allocate memory to transfer socket informations\n"); + ha_warning("Failed to allocate memory to transfer socket information\n"); goto out; } iov.iov_base = tmpbuf; @@ -2391,7 +2391,7 @@ int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit) /* We must trim any excess data from the response buffer, because we * may have blocked an invalid response from a server that we don't - * want to accidently forward once we disable the analysers, nor do + * want to accidentally forward once we disable the analysers, nor do * we want those data to come along with next response. A typical * example of such data would be from a buggy server responding to * a HEAD with some data, or sending more than the advertised diff --git a/src/hlua.c b/src/hlua.c index 34d39fb87..98fa354c4 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -405,8 +405,8 @@ static int hlua_arg2lua(lua_State *L, const struct arg *arg) /* This function take one entrie 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 gived to the - * lua wrapper and converted as arg list by thi function. + * with sample fetch wrappers. The input arguments are given to the + * lua wrapper and converted as arg list by the function. */ static int hlua_lua2arg(lua_State *L, int ud, struct arg *arg) { @@ -441,7 +441,7 @@ static int hlua_lua2arg(lua_State *L, int ud, struct arg *arg) /* the following functions are used to convert a struct sample * in Lua type. This useful to convert the return of the - * fetchs or converters. + * fetches or converters. */ static int hlua_smp2lua(lua_State *L, struct sample *smp) { @@ -493,7 +493,7 @@ static int hlua_smp2lua(lua_State *L, struct sample *smp) /* the following functions are used to convert a struct sample * in Lua strings. This is useful to convert the return of the - * fetchs or converters. + * fetches or converters. */ static int hlua_smp2lua_str(lua_State *L, struct sample *smp) { @@ -584,7 +584,7 @@ static int hlua_lua2smp(lua_State *L, int ud, struct sample *smp) return 1; } -/* This function check the "argp" builded by another conversion function +/* This function check the "argp" built by another conversion function * 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. * @@ -2696,7 +2696,7 @@ static int hlua_channel_new(lua_State *L, struct channel *channel) * in a string LUA variables. Returns -1 and push a nil value in * the stack if the channel is closed and all the data are consumed, * returns 0 if no data are available, otherwise it returns the length - * of the builded string. + * of the built string. */ static inline int _hlua_channel_dup(struct channel *chn, lua_State *L) { @@ -7456,7 +7456,7 @@ static int hlua_cli_parse_fct(char **args, char *payload, struct appctx *appctx, appctx->ctx.hlua_cli.hlua = hlua; /* Create task used by signal to wakeup applets. - * We use the same wakeup fonction than the Lua applet_tcp and + * We use the same wakeup function than the Lua applet_tcp and * applet_http. It is absolutely compatible. */ appctx->ctx.hlua_cli.task = task_new(tid_bit); @@ -7816,7 +7816,7 @@ static int hlua_load(char **args, int section_type, struct proxy *curpx, lua_pop(gL.T, 1); return -1; default: - memprintf(err, "Lua unknonwn error: %s\n", lua_tostring(gL.T, -1)); + memprintf(err, "Lua unknown error: %s\n", lua_tostring(gL.T, -1)); lua_pop(gL.T, 1); return -1; } @@ -8124,7 +8124,7 @@ void hlua_init(void) /* Create and fill the metatable. */ lua_newtable(gL.T); - /* Create and fille the __index entry. */ + /* Create and fill the __index entry. */ lua_pushstring(gL.T, "__index"); lua_newtable(gL.T); @@ -8156,7 +8156,7 @@ void hlua_init(void) /* Create and fill the metatable. */ lua_newtable(gL.T); - /* Create and fille the __index entry. */ + /* Create and fill the __index entry. */ lua_pushstring(gL.T, "__index"); lua_newtable(gL.T); @@ -8187,7 +8187,7 @@ void hlua_init(void) /* Create and fill the metatable. */ lua_newtable(gL.T); - /* Create and fille the __index entry. */ + /* Create and fill the __index entry. */ lua_pushstring(gL.T, "__index"); lua_newtable(gL.T); @@ -8280,7 +8280,7 @@ void hlua_init(void) /* Create and fill the metatable. */ lua_newtable(gL.T); - /* Create and fille the __index entry. */ + /* Create and fill the __index entry. */ lua_pushstring(gL.T, "__index"); lua_newtable(gL.T); @@ -8318,7 +8318,7 @@ void hlua_init(void) /* Create and fill the metatable. */ lua_newtable(gL.T); - /* Create and fille the __index entry. */ + /* Create and fill the __index entry. */ lua_pushstring(gL.T, "__index"); lua_newtable(gL.T); @@ -8346,7 +8346,7 @@ void hlua_init(void) /* Create and fill the metatable. */ lua_newtable(gL.T); - /* Create and fille the __index entry. */ + /* Create and fill the __index entry. */ lua_pushstring(gL.T, "__index"); lua_newtable(gL.T); @@ -8377,7 +8377,7 @@ void hlua_init(void) /* Create and fill the metatable. */ lua_newtable(gL.T); - /* Create and fille the __index entry. */ + /* Create and fill the __index entry. */ lua_pushstring(gL.T, "__index"); lua_newtable(gL.T); @@ -8431,7 +8431,7 @@ void hlua_init(void) /* Create and fill the metatable. */ lua_newtable(gL.T); - /* Create and fille the __index entry. */ + /* Create and fill the __index entry. */ lua_pushstring(gL.T, "__index"); lua_newtable(gL.T); diff --git a/src/http_htx.c b/src/http_htx.c index 0e686956c..13b11a38a 100644 --- a/src/http_htx.c +++ b/src/http_htx.c @@ -992,7 +992,7 @@ struct buffer *http_load_errorfile(const char *file, char **errmsg) return buf; } -/* Convert the raw http message into an HTX message. On sucess, the HTX +/* Convert the raw http message into an HTX message. On success, the HTX * message is returned. On error, NULL is returned and an error message is * written into the buffer. */ @@ -1974,7 +1974,7 @@ int val_blk_arg(struct arg *arg, char **err_msg) /* Note: must not be declared as its list will be overwritten. - * Note: htx sample fetches should only used for developpement purpose. + * Note: htx sample fetches should only used for development purpose. */ static struct sample_fetch_kw_list sample_fetch_keywords = {ILH, { { "internal.strm.is_htx", smp_fetch_is_htx, 0, NULL, SMP_T_BOOL, SMP_USE_L6REQ }, diff --git a/src/stick_table.c b/src/stick_table.c index 665cc3768..72b0f8b6b 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -703,7 +703,7 @@ int stktable_parse_type(char **args, int *myidx, unsigned long *type, size_t *ke * is the stick-table name which is sent over the network. It must be equal * to if this stick-table is parsed from a proxy section, and prefixed by * "peers" section name followed by a '/' character if parsed from a "peers" section. - * This is the responsability of the caller to check this. + * This is the responsibility of the caller to check this. * Return an error status with ERR_* flags set if required, 0 if no error was encountered. */ int parse_stick_table(const char *file, int linenum, char **args, diff --git a/tests/test-acl-args.cfg b/tests/test-acl-args.cfg index 5946f0e48..38485e530 100644 --- a/tests/test-acl-args.cfg +++ b/tests/test-acl-args.cfg @@ -20,7 +20,7 @@ frontend 1 # missing closing ')' after arguments to fetch keyword 'req.hdr' in ACL expression 'req.hdr('. block if { req.hdr( } - # cannot be triggerred : "returns type of fetch method '%s' is unknown" + # cannot be triggered : "returns type of fetch method '%s' is unknown" # fetch method 'always_true' : no argument supported, but got 'arg' in ACL expression 'always_true(arg)'. block if { always_true(arg) } diff --git a/tests/test-sample-fetch-args.cfg b/tests/test-sample-fetch-args.cfg index cddf4fee6..cb0be09b8 100644 --- a/tests/test-sample-fetch-args.cfg +++ b/tests/test-sample-fetch-args.cfg @@ -20,7 +20,7 @@ frontend 1 # missing closing ')' after arguments to fetch keyword 'req.hdr' http-request add-header name %[req.hdr(] - # cannot be triggerred : "returns type of fetch method '%s' is unknown" + # cannot be triggered : "returns type of fetch method '%s' is unknown" # fetch method 'always_true' : no argument supported, but got 'arg' http-request add-header name %[always_true(arg)]