]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: assorted typo fixes in the code and comments
authorIlya Shipitsin <chipitsine@gmail.com>
Tue, 7 Apr 2020 20:07:56 +0000 (01:07 +0500)
committerWilly Tarreau <w@1wt.eu>
Thu, 16 Apr 2020 08:04:36 +0000 (10:04 +0200)
This is 7th iteration of typo fixes

19 files changed:
ebtree/ebistree.c
ebtree/ebistree.h
ebtree/ebsttree.c
ebtree/ebsttree.h
include/types/acl.h
include/types/applet.h
include/types/compression.h
include/types/dns.h
include/types/hlua.h
include/types/map.h
include/types/server.h
include/types/spoe.h
src/checks.c
src/cli.c
src/hlua.c
src/http_htx.c
src/stick_table.c
tests/test-acl-args.cfg
tests/test-sample-fetch-args.cfg

index 098ccfb43c5c16e5a253355145a066947c6ef60d..6ad5e95f4d07c01c7b2930ae5a387409021ce082 100644 (file)
@@ -23,7 +23,7 @@
 #include "ebistree.h"
 
 /* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
- * 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)
index 0c995483f4cb81291e0fd2daca75bb727507e3fb..a438fa147994cf081eccd8f2032683b2a50c3396 100644 (file)
@@ -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 <len> string <x> in the tree <root>.
- * 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 <x> in the first <len> 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 <x> in the tree <root>.
- * 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)
index e44796ca6012ebebe5e4743074655c342fa05d45..12469cc1faab4f98eb9385d4727c9d18fb251609 100644 (file)
@@ -23,7 +23,7 @@
 #include "ebsttree.h"
 
 /* Find the first occurrence of a zero-terminated string <x> in the tree <root>.
- * 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)
index d1949c788d6ddbd9cd192726591735c953b374b4..db2267bf1962f667febcc8496fdb5399cf9f7817 100644 (file)
@@ -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 <len> string <x> in the tree <root>.
- * 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 <x> in the first <len> 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 <x> in the tree <root>.
- * 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)
index 3d4428434cd956546d39033b36a885f18c70a455..04318ea04c3d2937beb2d85650ef73d708157346 100644 (file)
@@ -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)
  *   ------+-----       -----+------+------+-----    -----+------+------+-----
index 0f10e26df499c80a9662a829db0d6f8d866e815b..b990726f7c9b0a43bf9d78c48953ec3c1caa625e 100644 (file)
@@ -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
index e515aadf23c1185610e27a1f90f4891fb08cc97d..fc2ad26687c5067cf75bae82c249f042717f806a 100644 (file)
@@ -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
index 7e592b2858acf836a2c65be3c3f563fdc4962f71..9926de0c7e6ea98fea68deae693c8e1c7a72e72d 100644 (file)
@@ -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;
 };
 
index 414508650d4bc30980078f30eed473ac3e183868..28ed9bd4911797dd06cdac481eba8de9389ff9b8 100644 (file)
@@ -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;
index cea5aa55d49a534386a8376cd83c52ba7ead5eaf..750da56da2e9e8c40e15bbfc4b7ef86113582984 100644 (file)
@@ -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 <pat> is the orignal pat and must be freed */
+       int do_free;                   /* set if <pat> is the original pat and must be freed */
 };
 
 #endif /* _TYPES_MAP_H */
index 1e5e031a7d25bc392e281ef74df893b0c47efb2e..48582e6138f95b1a9bd7253c43ba2f0f71e1c9c1 100644 (file)
@@ -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 */
index 2dbf6e565715806f1b0a50b898773a137a52a0a0..eaa0ef05c3fc23a2ace7602908dc8b45c0b3ea53 100644 (file)
@@ -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 */
index ee2997aa5399fcb748256473c316dfc268f825f4..e5b53750015bac0f4226d73bae64c2446741bd84 100644 (file)
@@ -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;
index 25f72eae5dcf6c1861421a456ce9a59037f21f8c..af178110414f78b238c4232715c68b1a7c9bbeb0 100644 (file)
--- 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
index 34d39fb87b46b3edd149f33384e9ccc82bcd9d71..98fa354c44f58e0734fe042dd8cc941afe0142fa 100644 (file)
@@ -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);
 
index 0e686956c77cfd081becb530725dae664d68eb2e..13b11a38aaca1c99c5460f567e5ddd67e35d57c0 100644 (file)
@@ -992,7 +992,7 @@ struct buffer *http_load_errorfile(const char *file, char **errmsg)
        return buf;
 }
 
-/* Convert the raw http message <msg> into an HTX message. On sucess, the HTX
+/* Convert the raw http message <msg> into an HTX message. On success, the HTX
  * message is returned. On error, NULL is returned and an error message is
  * written into the <errmsg> buffer.
  */
@@ -1974,7 +1974,7 @@ int val_blk_arg(struct arg *arg, char **err_msg)
 
 
 /* Note: must not be declared <const> 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 },
index 665cc37680c0a97c0169c1b4cf30b1674940c31f..72b0f8b6b71479ae9f2bc86acc9af65290ddb8fa 100644 (file)
@@ -703,7 +703,7 @@ int stktable_parse_type(char **args, int *myidx, unsigned long *type, size_t *ke
  * <nid> is the stick-table name which is sent over the network. It must be equal
  * to <id> if this stick-table is parsed from a proxy section, and prefixed by <peers>
  * "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,
index 5946f0e48753b298c3c90e910af95ebaef666662..38485e5300e14c446cc597ba2e58d2ebc744bc51 100644 (file)
@@ -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) }
index cddf4fee61440105bb1e24e7d2fb65d8f23edb8c..cb0be09b801670a7e129d4d6ad6325f084eb6bf4 100644 (file)
@@ -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)]