]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: assorted typo fixes in the code and comments
authorIlya Shipitsin <chipitsine@gmail.com>
Wed, 6 Jan 2021 16:20:16 +0000 (21:20 +0500)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Jan 2021 16:32:03 +0000 (17:32 +0100)
This is 15th iteration of typo fixes

include/haproxy/port_range.h
src/auth.c
src/cache.c
src/ev_poll.c
src/ev_select.c
src/fd.c
src/hlua.c
src/mux_h1.c
src/proto_quic.c
src/stream.c

index 8e7a937f527955e2fae74409d5581e0fc85bb73b..c0d86591a75e12c8e5434d5e2e2e6a2f2ceda716 100644 (file)
@@ -37,7 +37,7 @@ static inline int port_range_alloc_port(struct port_range *range)
 
        get = _HA_ATOMIC_LOAD(&range->get);
        do {
-               /* barrier ot make sure get is loaded before put */
+               /* barrier to make sure get is loaded before put */
                __ha_barrier_atomic_load();
                put = _HA_ATOMIC_LOAD(&range->put_t);
                if (unlikely(put == get))
index a3597d83c3f39848ca869f93e063580d7b74b2f3..5d74f7af4057a8ef768dce9e2bbc214091307452 100644 (file)
@@ -49,7 +49,7 @@ __decl_thread(static HA_SPINLOCK_T auth_lock);
 #endif
 
 /* find targets for selected groups. The function returns pointer to
- * the userlist struct ot NULL if name is NULL/empty or unresolvable.
+ * the userlist struct or NULL if name is NULL/empty or unresolvable.
  */
 
 struct userlist *
index 9485caa00584f87dfd04695baa2c8259601c2393..9267f5c64af3773034bb5e1dfb52f3ec009e26f8 100644 (file)
@@ -713,7 +713,7 @@ cache_store_http_end(struct stream *s, struct filter *filter,
  /*
   * This intends to be used when checking HTTP headers for some
   * word=value directive. Return a pointer to the first character of value, if
-  * the word was not found or if there wasn't any value assigned ot it return NULL
+  * the word was not found or if there wasn't any value assigned or it return NULL
   */
 char *directive_value(const char *sample, int slen, const char *word, int wlen)
 {
@@ -965,7 +965,7 @@ static void set_secondary_key_encoding(struct htx *htx, char *secondary_key)
                resp_encoding_bitmap |= VARY_ENCODING_IDENTITY;
 
        /* Rewrite the bitmap part of the hash with the new bitmap that only
-        * correponds the the response's encoding. */
+        * corresponds the the response's encoding. */
        write_u32(secondary_key + offset, resp_encoding_bitmap);
 }
 
@@ -2292,7 +2292,7 @@ static int accept_encoding_normalizer(struct htx *htx, struct ist hdr_name,
        unsigned int encoding_value;
        unsigned int rejected_encoding;
 
-       /* A user agent always accepts an unencoded value unless it explicitely
+       /* A user agent always accepts an unencoded value unless it explicitly
         * refuses it through an "identity;q=0" accept-encoding value. */
        hash.encoding_bitmap |= VARY_ENCODING_IDENTITY;
 
@@ -2318,12 +2318,12 @@ static int accept_encoding_normalizer(struct htx *htx, struct ist hdr_name,
        }
 
        /* If a "*" was found in the accepted encodings (without a null weight),
-        * all the encoding are accepted except the ones explicitely rejected. */
+        * all the encoding are accepted except the ones explicitly rejected. */
        if (hash.encoding_bitmap & VARY_ENCODING_STAR) {
                hash.encoding_bitmap = ~0;
        }
 
-       /* Clear explicitely rejected encodings from the bitmap */
+       /* Clear explicitly rejected encodings from the bitmap */
        hash.encoding_bitmap &= encoding_bmp_bl;
 
        /* As per RFC7231#5.3.4, "If no Accept-Encoding field is in the request,
index b0b0e2bc4daaa424cc085303e8c513d6978ce399..f86be7691c0d9bb55edc730a9b57df7baf69b783 100644 (file)
@@ -132,7 +132,7 @@ static void _do_poll(struct poller *p, int exp, int wake)
                        break;
                if (fdtab[fd].update_mask & tid_bit) {
                        /* Cheat a bit, as the state is global to all pollers
-                        * we don't need every thread ot take care of the
+                        * we don't need every thread or take care of the
                         * update.
                         */
                        _HA_ATOMIC_AND(&fdtab[fd].update_mask, ~all_threads_mask);
index aca1ea8ec15baa60e4fe4492469ad700a7df2a3d..dd0b762de362b17c2497b35ebdb69319cc78d1ff 100644 (file)
@@ -123,7 +123,7 @@ static void _do_poll(struct poller *p, int exp, int wake)
                        break;
                if (fdtab[fd].update_mask & tid_bit) {
                        /* Cheat a bit, as the state is global to all pollers
-                        * we don't need every thread ot take care of the
+                        * we don't need every thread or take care of the
                         * update.
                         */
                        _HA_ATOMIC_AND(&fdtab[fd].update_mask, ~all_threads_mask);
index 7cb864ec9183c0b96545f5d10b8943d2259748ae..ccdefc67690047fcc08786bed433879d3570f5a7 100644 (file)
--- a/src/fd.c
+++ b/src/fd.c
@@ -165,7 +165,7 @@ redo_last:
        }
        __ha_barrier_store();
        /* since we're alone at the end of the list and still locked(-2),
-        * we know noone tried to add past us. Mark the end of list.
+        * we know no one tried to add past us. Mark the end of list.
         */
        _GET_PREV(fd, off) = last;
        _GET_NEXT(fd, off) = -1;
index ca07bb8a3886f46e1a1850eb6fe4c0c8d50398d9..a52a1b50ddf238e1b5cb2860e5d062f9e47e2c4d 100644 (file)
@@ -1706,7 +1706,7 @@ __LJMP static int hlua_map_new(struct lua_State *L)
 
        /* load the map. */
        if (!sample_load_map(args, &conv, file, line, &err)) {
-               /* error case: we cant use luaL_error because we must
+               /* error case: we can't use luaL_error because we must
                 * free the err variable.
                 */
                luaL_where(L, 1);
@@ -1803,11 +1803,11 @@ static void hlua_socket_handler(struct appctx *appctx)
                stream_shutdown(si_strm(si), SF_ERR_KILLED);
        }
 
-       /* If we cant write, wakeup the pending write signals. */
+       /* If we can't write, wakeup the pending write signals. */
        if (channel_output_closed(si_ic(si)))
                notification_wake(&appctx->ctx.hlua_cosocket.wake_on_write);
 
-       /* If we cant read, wakeup the pending read signals. */
+       /* If we can't read, wakeup the pending read signals. */
        if (channel_input_closed(si_oc(si)))
                notification_wake(&appctx->ctx.hlua_cosocket.wake_on_read);
 
@@ -8589,7 +8589,7 @@ int hlua_post_init()
         *  - only the function_ref[0] set to -1 and all other positive
         * This ensure a same reference is not used both in shared
         * lua state and thread dedicated lua state. Note: is the case
-        * reach, the shared state is prioritary, but the bug will be
+        * reach, the shared state is priority, but the bug will be
         * complicated to found for the end user.
         */
        errors = 0;
@@ -8609,8 +8609,8 @@ int hlua_post_init()
                }
 
                if ((fcn->function_ref[0] == -1) == (ret < 0)) {
-                       ha_alert("Lua function '%s' is referenced both ins shared Lua context (throught lua-load) "
-                                "and per-thread Lua context (throught lua-load-per-thread). these two context "
+                       ha_alert("Lua function '%s' is referenced both ins shared Lua context (through lua-load) "
+                                "and per-thread Lua context (through lua-load-per-thread). these two context "
                                 "exclusive.\n", fcn->name);
                        errors++;
                }
@@ -8619,7 +8619,7 @@ int hlua_post_init()
        if (errors > 0)
                return 0;
 
-       /* after this point, this global wil no longer used, so set to
+       /* after this point, this global will no longer be used, so set to
         * -1 in order to have probably a segfault if someone use it
         */
        hlua_state_id = -1;
index 3ed0001a765570f073573e02ece456a7ce7ae1d5..75eb5f7fa192736c2b0ddac303483776f56e3622 100644 (file)
@@ -1125,11 +1125,11 @@ static void h1_adjust_case_outgoing_hdr(struct h1s *h1s, struct h1m *h1m, struct
        if (eb_is_empty(&hdrs_map.map))
                return;
 
-       /* No conversion fo the request headers */
+       /* No conversion for the request headers */
        if (!(h1m->flags & H1_MF_RESP) && !(h1s->h1c->px->options2 & PR_O2_H1_ADJ_BUGSRV))
                return;
 
-       /* No conversion fo the response headers */
+       /* No conversion for the response headers */
        if ((h1m->flags & H1_MF_RESP) && !(h1s->h1c->px->options2 & PR_O2_H1_ADJ_BUGCLI))
                return;
 
index 8b3e91bb9f0a1f78d67569ac5dcb0235cfd3f703..fa36ba70726e27a437d4db10bda7e93868fa35b0 100644 (file)
@@ -574,7 +574,7 @@ static int quic_bind_listener(struct listener *listener, char *errmsg, int errle
 static void quic_enable_listener(struct listener *l)
 {
        /* FIXME: The following statements are incorrect. This
-        * is the responsability of the QUIC xprt to stop accepting new
+        * is the responsibility of the QUIC xprt to stop accepting new
         * connections.
         */
        if (fd_updt)
@@ -587,7 +587,7 @@ static void quic_enable_listener(struct listener *l)
 static void quic_disable_listener(struct listener *l)
 {
        /* FIXME: The following statements are incorrect. This
-        * is the responsability of the QUIC xprt to start accepting new
+        * is the responsibility of the QUIC xprt to start accepting new
         * connections again.
         */
        if (fd_updt)
index e24ea49fcfcec435475e3691ea0d5fe66d3859f4..5e675b1925db4ab2448f59cc6ab5694bcc4e1719 100644 (file)
@@ -2004,7 +2004,7 @@ struct task *process_stream(struct task *t, void *context, unsigned short state)
         */
 
 
-       /* If noone is interested in analysing data, it's time to forward
+       /* If no one is interested in analysing data, it's time to forward
         * everything. We configure the buffer to forward indefinitely.
         * Note that we're checking CF_SHUTR_NOW as an indication of a possible
         * recent call to channel_abort().
@@ -2175,7 +2175,7 @@ struct task *process_stream(struct task *t, void *context, unsigned short state)
 
        /* perform output updates to the response buffer */
 
-       /* If noone is interested in analysing data, it's time to forward
+       /* If no one is interested in analysing data, it's time to forward
         * everything. We configure the buffer to forward indefinitely.
         * Note that we're checking CF_SHUTR_NOW as an indication of a possible
         * recent call to channel_abort().